ClickOnce does not obey the installation folder for the local host

I am testing ClickOnce application deployment. I installed a virtual directory on my computer (works with IIS). I specified http: // localhost / SampleApplication as the installation folder URL on the Publish tab in Visual Studio. However, when I publish the application, I get the following error:

Caution: Files cannot be downloaded from http: // chrish / SampleApplication / .

The remote server returned an error: (407) Proxy authentication required. Publish success.

Warning: it is not possible to view the published application at http: //chrish/SampleApplication/publish.htm . http: //chrish/SampleApplication/publish.htm

Notice how he changed my URL from Localhost to my login name. What for? This did not happen a week ago.

+4
source share
2 answers

Installing ClickOnce involves checking whether the server name matches the expected name. Thus, localhost is always translated under covers to the computer name [not the username, as you suggest in your question] (one of the many confusing things ClickOnce does - one of the side effects of this is that if you want to configure 3 boot servers, you need to make 3 separate publications and / or a script to publish like this ) or like this . So this is not a surprise - he always does it under the covers.

Error 407 relates to the proxy server. This means that the download is redirected through a proxy server such as Microsoft ISA Server. Review your Internet Explorer proxy settings and make sure it bypasses local addresses [for example, chrish ].

The reason he reports success is because the download probably uses an alternative mechanism than checking and is not routed through / blocked by the proxy. (The main problem is that the .NET platform does not pass proxy credentials by default, and you need to either apply a configuration entry for devenv or regardless of the publication or build process invokes a test step with additional code that sends the credentials proxy data] ( http://blogs.msdn.com/jpsanders/archive/2009/03/24/httpwebrequest-webexcepton-the-remote-server-returned-an-error-407-proxy-authentication-required.aspx ) See Also How to set a default proxy server to use the default credentials? )

+5
source

ClickOnce does not like "localhost", but you can get around this.

If you set the location of the publication folder, follow these steps:

C: \ Inetpub \ Wwwroot \ SampleApplication \

and installation folder url:

http: // chrish / SampleApplication /

(where "chrish" is the network name of your computer), you can publish it locally.

0
source

All Articles