开发者

ClickOnce application fails if 'Check for Updates' is selected

Here's what I'm doing. I have created as simple, blank WPF application under Visual Studio 2010. I enable ClickOnce deployment, set the signing, security, etc., and publish to a local IIS instance. I fire up the browser, hit the publish.htm page, and it installs correctly.

Next, I blow everything away (this is testing after all), recreate the project, enable ClickOnce, sign it, etc., but this time I also click the 'Updates...' button on the Properties -> Publish page. I click on the checkbox for 'The Application should check for updates' and select the radio button for 'Before the application starts'. I click OK, publish it to the local IIS again, and hit the publish.htm page. When I click 'Install' though, I get an error, 'Cannot download the application. The application is missing required files. Contact application vendor for assistance.'.

The only reference I've found is that there is a file listed in the application.manifest file that is missing, but I can't seem to determine what it is. If someone could even simply point me in the right direction on this one, I'd appreciate it.

It's definitely a 404 Not Found error, but I have no idea what file it is referring to. Here's the 'details' page -

PLATFORM VERSION INFO
    Windows             : 6.1.7600.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.1
    System.Deployment.dll       : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll             : 4.0.30319.1 (RTMRel.030319-0100)
    dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment url          : http://localhost/WpfApplication1/WpfApplication1.application
                        Server      : Microsoft-IIS/7.5
                        X-Powered-By    : ASP.NET
    Deployment Provider url     : http://jerrydev/WpfApplication1/WpfApplication1.application

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://localhost/WpfApplication1/WpfApplication1.application resulted in exception. Following failure messages were detected:
        + Downloading http://jerrydev/WpfApplication1/WpfApplication1.application did not succeed.
        + The remote server returned an error: (404) Not Found.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.
开发者_JAVA技巧
OPERATION PROGRESS STATUS
    * [1/13/2011 11:05:50 AM] : Activation of http://localhost/WpfApplication1/WpfApplication1.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [1/13/2011 11:05:50 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading http://jerrydev/WpfApplication1/WpfApplication1.application did not succeed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
            at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
            at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
            at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
        --- Inner Exception ---
        System.Net.WebException
        - The remote server returned an error: (404) Not Found.
        - Source: System
        - Stack trace:
            at System.Net.HttpWebRequest.GetResponse()
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.


Are you publishing to localhost and installing it on the same machine? I'm asking because it has localhost in the URL. Did you fill in the UpdateURL in the Updates dialog, or leave it blank? If it should be the same location as the installation URL, then leave it blank.

What does your installation URL look like?


I was using localhost in the URLs for everything (Publish, install, update); what I found is that the publish process will use the machine name in the manifests in the case of 'localhost'. My problem actually stems from not having updated my Hosts.etc file to map my machine name to 'localhost'. Fixing this took care of all of my issues with both installing my clickonce app, as well as being able to update it once installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜