Training
Module
Explore application troubleshooting - Training
This module explores the methods and tools used for troubleshooting application deployment issues.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: Visual Studio
This article introduces common errors that can occur when you deploy ClickOnce application, and provides steps to resolve each problem.
The possible reason for this error is that content types (also known as MIME types) not being registered correctly on the server or client.
First, make sure that the server is configured to associate the .application extension with content type "application/x-ms-application".
If the server is configured correctly, check that the .NET Framework 2.0 is installed on your computer. If the .NET Framework 2.0 is installed, and you're still seeing this problem, try uninstalling and reinstalling the .NET Framework 2.0 to re-register the content type on the client.
This message indicates that one or more files that the ClickOnce manifests reference can't be downloaded. The easiest way to debug this error is to try to download the URL that ClickOnce says it can't download. Here are some possible causes:
deploymentProvider
URL in the deployment manifest is pointing to a different location than the URL used for activation.By default, a Visual Basic Windows-based application includes an App.config file. You may encounter a problem if you try to install from a Web server that uses Windows Server 2003, because that operating system blocks the installation of .config files for security reasons. To enable the .config file to be installed, select Use ".deploy" file extension in the Publish Options dialog box.
You also must set the content types (also known as MIME types) appropriately for .application, .manifest, and .deploy files. For more information, see your Web server documentation.
For more information, see Windows Server: Locked-down content types.
Ensure that you updated the manifest file and signed it again. Republish your application by using Visual Studio or use Mage to sign the application again.
This problem might be solved by completing one of the following tasks:
deploymentProvider
URL in the deployment manifest. Ensure that you're updating the bits in the same location that deploymentProvider
points to.This error may occur because you've manually edited the deployment and application manifests, and have caused the description of the identity of an assembly in one manifest to become out of sync with the other. The identity of an assembly consists of its name, version, culture, and public key token. Examine the identity descriptions in your manifests, and correct any differences.
ClickOnce uses the Deployment Provider URL to receive updates for the application. Verify that the location that the URL is pointing to is correct.
This error message usually indicates that there's a problem installing this application into the ClickOnce store. Either the application has an error or the store is corrupted. The log file might tell you where the error occurred.
To resolve this issue, follow these steps:
To use PrivatePath (Fusion probing paths), the application must request full trust permission. Try changing the application manifest to request full trust, and then try again.
This message usually indicates that the application has already been removed or the store is corrupted. After you select OK, the Add/Remove Program entry will be removed.
You're missing a prerequisite in the GAC (global assembly cache) that the application needs in order to run.
Ensure that you have the right to publish to the server that you're targeting. For example, if you're logged in to a terminal server computer as an ordinary user, not as an administrator, you probably won't have the rights required to publish to the local Web server.
If you're publishing with a URL, ensure that the destination computer has FrontPage Server Extensions enabled.
Ensure that you have the Microsoft Visual Studio Web Authoring Component installed on the machine that you're publishing from. For Express users, this component isn't installed by default.
This error message appears when you attempt to publish a WPF application with visual styles enabled. To resolve this issue, see How to: Publish a WPF Application with Visual Styles Enabled.
In the Signing dialog box, you must:
This issue is a known bug. All ClickOnce manifests are required to be signed. Just select one of the signing options, and then select OK.
The following table shows some common error messages that a client-computer user may receive when the user installs a ClickOnce application. Each error message is listed next to a description of the most probable cause for the error.
Error message | Description |
---|---|
Application cannot be started. Contact the application publisher. Cannot start the application. Contact the application vendor for assistance. |
These are generic error messages that occur when the application cannot be started, and no other specific reason can be found. Frequently this means that the application is somehow corrupted, or that the ClickOnce store is corrupted. |
Cannot continue. The application is improperly formatted. Contact the application publisher for assistance. Application validation did not succeed. Unable to continue. Unable to retrieve application files. Files corrupt in deployment. |
One of the manifest files in the deployment is syntactically not valid, or contains a hash that cannot be reconciled with the corresponding file. This error may also indicate that the manifest embedded inside an assembly is corrupted. Re-create your deployment and recompile your application, or find and fix the errors manually in your manifests. |
Cannot retrieve application. Authentication error. Application installation did not succeed. Cannot locate applications files on the server. Contact the application publisher or your administrator for assistance. |
One or more files in the deployment can't be downloaded because you don't have permission to access them. This can be caused by a 403 Forbidden error being returned by a Web server, which may occur if one of the files in your deployment ends with an extension that makes the Web server treat it as a protected file. Also, a directory that contains one or more of the application's files might require a username and password in order to access. |
Cannot download the application. The application is missing required files. Contact the application vendor or your system administrator for assistance. | One or more of the files listed in the application manifest cannot be found on the server. Check that you've uploaded all the deployment's dependent files, and try again. |
Application download did not succeed. Check your network connection, or contact your system administrator or network service provider. | ClickOnce cannot establish a network connection to the server. Examine the server's availability and the state of your network. |
URLDownloadToCacheFile failed with HRESULT '<number>'. An error occurred trying to download '<file>'. | If a user has set Internet Explorer Advanced Security option "Warn if changing between secure and not secure mode" on the deployment target computer, and if the setup URL of the ClickOnce application being installed is redirected from a nonsecure to a secure site (or vice-versa), the installation will fail because the Internet Explorer warning interrupts it. To resolve this error, you can do one of the following tasks: - Clear the security option. - Make sure the setup URL isn't redirected in such a way that changes security modes. - Remove the redirection completely and point to the actual setup URL. |
An error has occurred writing to the hard disk. There might be insufficient space available on the disk. Contact the application vendor or your system administrator for assistance. | This may indicate insufficient disk space for storing the application, but it may also indicate a more general I/O error when you're trying to save the application files to the drive. |
Cannot start the application. There is not enough available space on the disk. | The hard disk is full. Clear off space and try to run the application again. |
Too many deployed activations are attempting to load at once. | ClickOnce limits the number of different applications that can start at the same time. This is largely to help protect against malicious attempts to instigate denial-of-service attacks against the local ClickOnce service; users who try to start the same application repeatedly, in rapid succession, will only end up with a single instance of the application. |
Shortcuts cannot be activated over the network. | Shortcuts to a ClickOnce application can only be started on the local hard disk. They cannot be started by opening a URL that points to a shortcut file on a remote server. |
The application is too large to run online in partial trust. Contact the application vendor or your system administrator for assistance. | An application that runs in partial trust can't be larger than half of the size of the online application quota, which by default is 250 MB. |
Training
Module
Explore application troubleshooting - Training
This module explores the methods and tools used for troubleshooting application deployment issues.
Documentation
ClickOnce application fails to update - .NET Framework
ClickOnce depends on a file and registry cache to keep track of the present installed applications.
Security/versioning/manifest issues (ClickOnce) - Visual Studio (Windows)
Learn about issues with ClickOnce security, application versioning, and manifest syntax and semantics that can cause a ClickOnce deployment not to succeed.
Debug ClickOnce apps that use System.Deployment.Application - Visual Studio (Windows)
Learn how to use and customize advanced ClickOnce deployment features by accessing the deployment object model provided by System.Deployment.Application.