单击一次部署:下载 XXX.manifest 未成功。 (404) 未找到

Click once deployment: Downloading XXX.manifest did not succeed. (404) Not Found

我们的一位客户在部署新版本(从版本 2 升级到版本 3)后更新他们的 ClickOnce 应用程序并遇到问题。

首先,当他运行 应用程序时,它似乎没有检测到已部署新版本。后来,从应用程序服务器(从 URL 应用程序已发布到)手动下载最新的 AssemblyName.application 文件后,他收到以下错误,出于某种原因,它似乎一直在寻找旧部署(不再存在,因为它已被新部署取代)。 "funny" 的事情是我们从不同的机器和位置安装了这个版本,它对除了两个人 "behind that proxy" 之外的每个人都运行良好。这是他们收到的错误消息:


ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of example.com/YYY/Client/AppName.application resulted in exception. Following failure messages were detected:
        + Downloading example.com/YYY/Client/Application Files/AppName_2_0_0_0/AppName.exe.manifest 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.


ERROR DETAILS
    Following errors were detected during this operation.
    [22/03/2016 08:59:18] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading example.com/YYY/Client/Application Files/AppName_2_0_0_0/AppName.exe.manifest 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.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
            at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
            at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
            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.

DETAILED EXECUTION FLOW
...
[08:59:14] : DownloadQueueItem :  _sourceUri = example.com/YYY/Client/AppName.application,  _targetPath = D:\Users\UserName\AppData\Local\Temp\Deployment\MCX7AOC4.6KWE3KZCJY.P28.application
[08:59:16] : HttpWebRequest= Proxy.IsByPassed=False, ProxyUri=http://BLAproxy.BLA.com:8080/
[08:59:17] : HttpWebResponse=ResponseUri=example.com/YYY/Client/AppName.application
[08:59:17] : Method Call : ManifestReader.FromDocumentNoValidation(D:\Users\UserName\AppData\Local\Temp\Deployment\MCX7AOC4.6KWE3KZCJY.P28.application) called.
[08:59:17] : expectedAppId=example.com/YYY/Client/AppName.application#AppName.application, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0e37c329267e5e4f, processorArchitecture=msil/AppName.exe, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0e37c329267e5e4f, processorArchitecture=msil, type=win32
[08:59:17] : Reparse the deployment manifest for validations.
[08:59:17] : Method Call : ManifestReader.FromDocument(D:\Users\UserName\AppData\Local\Temp\Deployment\MCX7AOC4.6KWE3KZCJY.P28.application) called.
[08:59:17] : Schema validation passed.
[08:59:17] : Manifest is parsed successfully.
[08:59:17] : Semantic validation passed.
[08:59:18] : Signature validation passed.
[08:59:18] : Method Call : FollowDeploymentProviderUri called.
[08:59:18] : Deployment manifest zone is not local machine. Zone = Internet
[08:59:18] : providerUri=example.com/YYY/Client/AppName.application,sourceUri=example.com/YYY/Client/AppName.application
[08:59:18] : Deployment provider not followed.
[08:59:18] : Processing of deployment manifest has successfully completed.
[08:59:18] : Could not find application in store. Continue with downloading application manifest.
[08:59:18] : Method Call : InstallApplication called.
[08:59:18] : Method Call : DownloadApplication called.
[08:59:18] : Start processing application manifest.
[08:59:18] : Method Call : DownloadApplicationManifest called.
[08:59:18] : Method Call : DownloadManifest called.
[08:59:18] : Method Call : DownloadManifestAsRawFile called.
[08:59:18] : Method Call : DownloadSingleFile called
[08:59:18] : DownloadQueueItem :  _sourceUri = example.com/YYY/Client/Application Files/AppName_2_0_0_0/AppName.exe.manifest,  _targetPath = D:\Users\UserName\AppData\Local\Temp\Deployment\YLJO3ZJO.CAB\T2LP22AQ.EZX\AppName.exe.manifest
[08:59:18] : HttpWebRequest= Proxy.IsByPassed=False, ProxyUri=http://BLAproxy.BLA.com:8080/

有人知道可能发生了什么吗?我们有一些怀疑,但由于我不想限制您的回答,所以我暂时不提它们。

在此先感谢您的帮助!!!

万一它可以帮助将来的任何人:它最终成为缓存旧版本应用程序部署清单的代理的问题。

此外,卸载应用程序(从控制面板)并删除 ClickOnce 文件缓存(%userprofile%\AppData\Local\Apps.0*.*),如下所述 link 有助于修复过去也有很多问题:https://support.microsoft.com/en-us/kb/2713442

希望有一天这能对某人有所帮助...