Errors during ClickOnce deployment use

Source: Internet
Author: User
Tags windows web server browser cache clear internet ftp protocol
errors during ClickOnce deployment useEnable download of locked file extension

IIS (Internet Information Services) protects certain file types, such as. config files and. mdb files. If your application has locked files, do the following to enable downloading of this type of file:

Open the Properties page of VRoot in Inetmgr.

On the Virtual Directory tab, click Configure.

You will see a list of application mappings. Deletes a mapping of the. config extension to enable the. config file download. Repeat this action for all other extensions in this list that you want to download as part of the application.

For security reasons, some Web server configurations block files that are not commonly used in Web content. For example, files with the following extensions may be blocked:. dll,. config,. mdf. windows-based applications typically contain files with some of these extensions. If a user tries to run a ClickOnce application that accesses blocked files on the WEB server, an error occurs. There is no need to unblock all file extensions, and each application file is published by default using the ". Deploy" file name extension. If you use this option, the WEB server can only be configured to allow the following three file extensions:

. Application

. manifest

. Deploy

However, you can disable this option by clearing the use ' Deploy File extension ' option on the Publish Options dialog box, and you must configure the WEB server to allow all file extensions that are used in your application.

Sometimes you must configure. manifest,. Application, and. Deploy, for example, if you are using IIS that does not have the. NET Framework installed, or if you are using a different WEB server (for example, Apache). Configure Expiration settings

Internet Explorer performs a download of the. application file when the application is launched through a URL. Therefore, all expiration settings that notify the browser cache file will be valid. Instead of detecting new updates, the client uses the. Application in the IE cache. To ensure that the client detects updates whenever the update is available, enable the "Expire now" option in IIS.

Perform this operation in IIS:

Run Inetmgr and open the Properties page for VRoot (or the entire server).

Click the HTTP Headers tab.

Click Enable Content Expiration.

Click Expire Now.

Restart IIS. FTP Protocol not supported

ClickOnce supports installing applications from any HTTP 1.1 Web server or file server. The FTP protocol is not supported. You can use the FTP://protocol to publish your application, but you must perform the installation using the http://, https://, or file://protocols. Configuring servers correctly

One of the most common problems with ClickOnce is that ClickOnce is unable to download files from the network server because of configuration problems. If you encounter problems downloading files during your ClickOnce installation, try downloading the same files using Internet Explorer. This will narrow the problem to a ClickOnce problem rather than a normal server/network problem. Requires Administrator privileges

If you use HTTP Publishing, you must have administrator privileges on the target server (IIS requires this privilege level). If you do not use HTTP publishing, you only have write permissions on the target path. Anonymous access must be enabled

When you publish to a remote server that has anonymous access turned off, you receive the following warning: "The files could not being downloaded from http://<remoteserver>/<myapplication >/. The remote server returned an error: (401) unathorized.

To resolve this issue, in Windows Explorer, right-click My Computer, and then select Manage. In the Computer Management dialog box, open the Services and Applications node, click Internet Information Services, click Web Site, and then right-click Default Web site. In the Default Web Site Properties dialog box, click the Directory Security tab, and then click the Edit button. In the Authentication Methods dialog box, select the Anonymous access check box. Windows XP sp2:windows Firewall

Windows XP SP2 enables Windows Firewall by default. If you develop an application on a computer that has Windows XP installed, you can still publish and run the ClickOnce application from the local IIS server. However, if you do not open Windows firewall, you cannot access the IIS server from another computer. To manage Windows Firewall, select Windows Firewall from the Control Panel. Windows Server 2003: Enable FrontPage Server Extensions

Using HTTP to publish an application to a Windows Web server requires a FrontPage server extension (FPSE).

By default, Windows Server 2003 does not install FPSE. If you want to use Visual Studio to publish an application to a Windows Server 2003 Web server through HTTP with FPSE, you must first install FPSE. You can do this by using the Manage Your Server administration tool in Windows Server 2003. MIME Type Mappings

When publishing on HTTP, the MIME type of the. application file should be "Application/x-ms-application". If the. NET Framework 2.0 is installed on the server, the type is automatically set. If it is not installed, MIME type associations need to be created for the ClickOnce application vroot (or the entire server).

Perform this operation in IIS:

Run Inetmgr and open the Properties page for VRoot (or the entire server).

Click the HTTP Headers tab.

Click the File Type button in the Mime Mappings section.

Click New type to add a new type. Type applicationin the related extension, and type application/x-ms-applicationin Content Type (MIME).

Restart IIS. Windows Server 2003: Locked MIME types

IIS on Windows Server 2003 locks all file types except for certain known types, such as. htm,. html,. txt, and so on. To deploy a ClickOnce application using this server, you need to change the IIS settings to allow downloads of. Application,. manifest, and files for all other custom file types that your application uses.

Perform this operation in IIS:

Run Inetmgr and open the Properties page for the computer node.

Click the MIME Type button.

Click the New button, and then add the new extension and the necessary MIME type.

For. Application and. manifest extensions, the MIME type should be "application/x-ms-application". For other file types, the MIME type should be "Application/octet-stream".

If you create a MIME type with the extension "*" with the MIME type "Application/octet-stream", you will be allowed to download files of the file type that are not blocked. (However, you cannot download blocked file types, such as. aspx and. asmx).

Restart IIS. <script type=text/javascript> var expcolldivstr = expcolldivstr; Expcolldivstr = Expcolldivstr + "ctl00_libframe_ctl08b2d8d8b,"; var expcollimgstr = expcollimgstr; Expcollimgstr = Expcollimgstr + "ctl00_libframe_ctl08img,"; </script> Troubleshooting Guide
Using the ClickOnce error log

When a ClickOnce error occurs, an error dialog box with the Details button is typically displayed. Click this button to open the ClickOnce log file for the application. Look for a specific error message in this log file that will indicate where the error occurred. If the information is not sufficient to help diagnose and resolve the problem, refer to the following in this troubleshooting guide.

ClickOnce maintains a log file for each application. This file is stored in the WinInet cache and is therefore applicable to the automatic cleanup mechanism.

Specify a custom log location: To have ClickOnce write the log to a specific location, place the registry key [Hkcu\software\microsoft\windows\currentversion\deployment] "LogFilePath" (STRING) set to a file, such as "C:\logs\ClickOnceLog.txt". Make sure that this directory exists on the computer (C:\Logs). All ClickOnce log messages for all applications are written to this file. Considerations when manually changing a manifest or application

Visual Studio Publishing is responsible for setting up applications and manifests. However, if you are updating your deployment outside of Visual Studio (for example, using MAGE), you need to be aware of some issues:

If you update a file in your application, you must update the reference to that file in the application manifest because the file will change.

If you update the application manifest in any way, you must update the application manifest reference in the deployment manifest. When using MageUI to update the application manifest references in the deployment manifest, make sure that the codebase points to your application manifest. MageUI always assumes that the application manifest is a subdirectory with a version, and this assumption is not always correct.

If you update the manifest in any way, you must sign it again. Considerations for using Deployment providers

This is an introduction to the issues you should be aware of when you find unexpected behavior in your ClickOnce application on the client. The ClickOnce deployment manifest has a deploymentprovider property that points to the full path to the source location where the application is installed and the service is serviced for the application.

Find the following line in the deployment manifest: <deploymentprovider codebase= "Http://myserver/myapp.application"/>

This line of content is set when you create a ClickOnce application, which is a required setting for an "Installed" application. The location in this setting is a standard location where the ClickOnce installer installs the application and finds updates from that location. All application files are installed from a location relative to this path.

Therefore, if you use the Xcopy command to copy your ClickOnce application to a different location without changing the deploymentprovider property, ClickOnce will still refer to the original location when you try to download the application.

If you want to move or copy an application, you must also update the deploymentprovider path so that the client can actually install from the new location. This is a common problem for "installed" applications. deploymentprovider is an optional setting for online applications that always start with the original URL. If deploymentprovideris set, this property is used, otherwise the application file is downloaded as the base URL using the URL used to activate the application.

Keep in mind that each time you update the manifest, you must sign it again. <script type=text/javascript> var expcolldivstr = expcolldivstr; Expcolldivstr = Expcolldivstr + "Ctl00_libframe_ctl1090e47d6,"; var expcollimgstr = expcollimgstr; Expcollimgstr = Expcollimgstr + "ctl00_libframe_ctl10img,"; </script> FAQ
Application startup and update problem: There is no response when browsing to a. application file, or the XML is rendered in IE, or the Run/Save As dialog box appears

Workaround: Most likely because the MIME type is not registered correctly on the server or client.

Check first to ensure that the server is configured to associate the. application extension with the MIME type "application/x-ms-application" (see "Server Configuration" above for more information). If the server is configured correctly, check to make sure the. NET Framework 2.0 is installed on your computer. If dnprdnlong is installed but the problem still occurs, try uninstalling and reinstalling the Framework to re-register the MIME type on the client. Problem: The error dialog box shows "The application cannot be retrieved." Missing file in deployment or application download interrupt, check for network errors and try again later

Workaround: This means that one or more of the files referenced by the ClickOnce manifest cannot be downloaded. The easiest way to debug this problem is to try to download a URL that ClickOnce indicates it cannot download. The possible causes are as follows:

If the log file displays "(403) Forbidden" or "(404) Not Found", check to make sure that the WEB server is configured to not block downloads of this file (see the "Server Configuration" section above).

If the server blocks the. config file, see the following question: Download error occurs when you install a ClickOnce application with a. config file.

Check to see if this problem is caused by the location of the deploymentprovider URL in the deployment manifest that is not the URL that is used to activate the application (for more information, refer to "Considerations for using Deployment Providers" above).

Check the server to make sure that all files exist, and that the ClickOnce log will indicate which files are not found.

Check for network connectivity problems, and you will receive this message if the client computer is offline during the download. Problem: A download error occurred while installing a ClickOnce application with a. config file

Applications based on Visual Basic Windows default to include a app.config file. A problem occurs when a user attempts to install from a WEB server that has Windows Server 2003 installed, because the operating system prevents the installation of the. config file for security reasons. To allow the installation of the. config file, click Use '. Deploy ' file name extension in the Publish Options dialog box.

You also need to set the MIME type accordingly. If you are using IIS, right-click My Computer in Windows Explorer, and then select Manage. Open Services and applications, click Internet Information Services, click Web Sites, and then select Properties.

Click the button labeled MIME type. In the MIME Type dialog box, add a MIME type for. Application,. manifest, and. deploy files.

For more information, see "Enabling download of locked file extensions" in the server configuration section above. Problem: Error message "Application format is incorrect"; log file contains "Invalid XML signature"

Workaround: Make sure to update the manifest file and sign it again. Use Visual Studio to republish the application, or use Mage to sign the application again. Issue: Security Warning "The application has been blocked because it poses a high security risk to the computer"

Workaround: This dialog box usually appears if an unsigned application on the Internet requests an upgraded trust. To allow this application to be installed and run, add the URL to the list of trusted sites. You can do this in Internet Explorer by using the Security tab in the Internet Options dialog box. Problem: I updated the application on the server, but the client does not download the update

WORKAROUND: There may be one of the following reasons

Please check the deploymentprovider URL in the deployment manifest. Are you sure that the update content is in the same location as the deploymentprovider point. (For more information, see "Considerations for using Deployment Providers" above.) )

Please check the update interval in the deployment manifest. If you set the interval to a phased interval (for example, once every six hours), ClickOnce waits until after this interval to check for updates. You can change the manifest so that it checks for updates each time the application starts. This option can be used at development time to easily verify that updates are being installed, but this slows down the application's activation speed.

Try restarting the application from the Start menu. ClickOnce may have detected an update in the background, but will prompt you to install it the next time it is activated. Problem: Error encountered during update, log entry record "References in deployment do not match identity defined in application manifest"

WORKAROUND: The problem may occur because ClickOnce is currently using an older version of the deployment manifest for the Internet Explorer cache, which does not match the latest application manifest on the server. To avoid this problem, it is recommended that the IIS settings on the server vroot (or deployment manifest) be changed to expire immediately, which forces the server to be checked every time it is activated. To do this in inetmgr, select the HTTP Headers tab on the VRoot Properties page, and then select the Enable Content expiration box and set to expire now.

Alternatively, you can restart Internet Explorer or clear Internet Explorer's Temporary Internet Files folder, and then run the application again, which will result in a server resynchronization. Problem: Successfully activated from local disk (or CD-ROM) for the first time, but then failed to activate from the Start menu

Workaround: ClickOnce uses the deployment provider URL to get updates for the application. Please check to make sure that the URL points to the correct location. (For more information, see "Deployment Providers" above.) Problem: Error "Cannot terminate application"

Workaround: This error message typically indicates an error occurred while installing the application into the ClickOnce store. Either the application is wrong or the store is corrupted. The log file may have a better indication of where the error occurred.

What to check:

Check the identity of the deployment manifest, the identity of the application manifest, and whether the identity of the main application EXE is unique.

If your application contains a file path that is too long (more than 100 characters), the maximum path limit for the store may be exceeded. Try shortening your path and reinstalling. Problem: The PrivatePath settings in the application configuration file do not work

Workaround: To use the privatepath (synthetic probing path), the application needs to have full trust permissions. Try changing the application manifest to request full trust, and then try again. Problem: The dialog box "failed to uninstall application" occurred during uninstall

Workaround: This usually indicates that the application has been deleted or that the store is corrupted. When you click OK, the Add/Remove Programs item is deleted. Problem: A dialog box appears during installation, prompting that platform dependencies are not installed

Workaround: The GAC (global assembly Cache) lacks a prerequisite for the application to run. Publishing problems using Visual Studio: Failure when publishing in Visual Studio

Make sure you have publishing permissions for the target server. For example, if you are logged on to a Terminal Server computer as a regular user rather than an administrator, you may not have permission to publish to a local Web server.

If you use a URL publication, make sure that the FrontPage Server Extensions are enabled on the target computer. Using the mage issue: I tried to sign with a certificate in the certificate store, but I received a blank message box

You need to do the following in the Signature dialog box:

Select "Sign with stored certificate", and then

Select a certificate from the list; The first certificate will not be selected automatically. Problem: An exception is caused when you click the "Do not sign" button

This is a known bug. All ClickOnce manifests need to be signed. Just select one of the signature options, and then click OK.

PS: The above errors and solutions are reproduced by me, did not try, we encountered and have a good solution, I hope to be able to post a share.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.