Microsoft KB Archive/925263

= Error message when you try to publish or to install a Visual Studio 2005 ClickOnce application from a remote server that uses Basic authentication: &quot;The files could not be downloaded&quot; =

Article ID: 925263

Article Last Modified on 1/12/2007

-

APPLIES TO


 * Microsoft Visual Studio 2005 Standard Edition
 * Microsoft Visual Studio 2005 Professional Edition
 * Microsoft Visual Studio 2005 Express Edition

-



SYMPTOMS
Consider the following scenario. You try to publish or to install a Microsoft Visual Studio 2005 ClickOnce application from a remote server. The remote server uses Basic authentication. In this scenario, you may receive a publishing error message that resembles the following:

The files could not be downloaded from http:// / /. The remote server returned an error: (401) Unauthorized.

You may also receive a downloading error message that resembles the following:

Cannot Retrieve Application. Authentication Error.



CAUSE
This problem occurs because Basic authentication is not supported by ClickOnce and cannot be used to publish or to install a ClickOnce application.



RESOLUTION
To resolve this problem, use Windows NT Challenge/Response (NTLM) authentication instead of Basic authentication if the Web site prompts you for credentials other than your default credentials.



Steps to reproduce the problem
 In Visual Studio 2005, click New on the File menu, and then click Project. Click Visual C#, click Windows Application, type WindowsApplication1 in the Name box, and then click OK. In Solution Explorer, right-click WindowsApplication1, and then click Publish. On the Where do you want to publish the application page in the Publish Wizard, enter a valid URL by using the following format, and then click Next:

http:// /

Note Anonymous access is disabled for the server, and Basic authentication is enabled. On the Will the application be available offline page, click the appropriate option:  If you want to enable the application to run when the user is disconnected from the network, click Yes, this application will be available online or offline.

A shortcut on the Start menu will be created for the application.</li> If you want to run the application directly from the publish location, click No, this application is only available online.

A shortcut on the Start menu will not be created.</li></ol> </li> Click Next, and then click Finish.</li></ol>

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

http://msdn2.microsoft.com/en-us/library/ms228998.aspx

http://msdn2.microsoft.com/en-us/library/aa378749.aspx

Additional query words: NTLM Basic authentication ClickOnce

Keywords: kbtshoot kbinfo kberrmsg kbprb KB925263

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.