views:

875

answers:

1

I'm testing a ClickOnce application deployment. I have setup a virtual directory on my machine (running IIS). I have specified http://localhost/SampleApplication as the Installation Folder URL in the Publish tab of Visual Studio. However, when I publish the application I get the following error:

Warning: Files could not be downloaded from http://chrish/SampleApplication/.

The remote server returned an error: (407) Proxy Authentication Required. Publish success.

Warning: Unable to view published application at http://chrish/SampleApplication/publish.htm. http://chrish/SampleApplication/publish.htm

Notice how it has changed my url from Localhost to my login name. Why? This wasn't happening a week ago.

+4  A: 

ClickOnce installation involves verifying that the server name matches the expected name. Thus localhost always gets translated under the covers to the computer name [not the username as you suggest in your question] (one of many confusing things ClickOnce does - one side effect of this is that if you want to set up 3 download servers, you need to do 3 separate publishes and/or script the publish like this) or like this. So this is not a surprise - it's always doing that under the covers.

The 407 error relates to proxy auth. This implies downloading is being diverted via a proxy such as Microsoft ISA Server. Have a look in your IE Internet Options Connections Proxy Settings and make sure its bypassing for local addresses [such as chrish].

The reason it's reporting success is that the upload likely uses an alternate mechanism than the verification does and isn't being routed via / blocked by the proxy. (The underlying problem is that the .NET framework does not by default pass proxy credentials and you'd need to either apply a config entry for devenv or whatever does the publish or have the build process call a test step with extra code that does send the proxy credentials](http://blogs.msdn.com/jpsanders/archive/2009/03/24/httpwebrequest-webexcepton-the-remote-server-returned-an-error-407-proxy-authentication-required.aspx). See also http://stackoverflow.com/questions/299940/how-should-i-set-the-default-proxy-to-use-default-credentials)

Ruben Bartelink
Ruben - you're a jerk for being so pushy about this when I'm going through a divorce, buying a house, moving in with my parents and generally going through a very, very difficult time in my life. Get some perspective pal - life is not centered around Bounty questions. Grow up.
Chris Holmes