Microsoft KB Archive/925263

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


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

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://<RemoteServer>/<ApplicationName>/. 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.

MORE INFORMATION

Steps to reproduce the problem

  1. In Visual Studio 2005, click New on the File menu, and then click Project.
  2. Click Visual C#, click Windows Application, type WindowsApplication1 in the Name box, and then click OK.
  3. In Solution Explorer, right-click WindowsApplication1, and then click Publish.
  4. 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://<ServerName>/<FolderName>

    Note Anonymous access is disabled for the server, and Basic authentication is enabled.
  5. On the Will the application be available offline page, click the appropriate option:
    1. 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.
    2. 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.
  6. Click Next, and then click Finish.

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


Additional query words: NTLM Basic authentication ClickOnce

Keywords: kbtshoot kbinfo kberrmsg kbprb KB925263