从网址下载更新。 C#

发布于 2024-08-20 17:22:52 字数 4754 浏览 4 评论 0原文

好的,我有一个应用程序可以在 http://mysite.ext/sub 检查更新/sub2/sub3/appname/ 第一次发布后(几天前),它正在正确地检查/下载该 URL 的更新,没有任何问题。

但是今天,我发布了一个新版本,仅对用户界面进行了微小的更改(更改按钮文本等),然后将最新发布上传到服务器...然后从桌面打开我的应用程序的现有版本,它检查更新,发现更新并继续下载它,但随后失败并出现此错误:

Cannot download the application. The application is missing required files. Contact application vendor for assistance.

我单击该错误对话框上的“详细信息”按钮,它打开了一个文本文件,其中显示:

PLATFORM VERSION INFO
 Windows    : 6.1.7600.0 (Win32NT)
 Common Language Runtime  : 4.0.21006.1
 System.Deployment.dll   : 4.0.21006.1 (B2Rel.021006-0100)
 clr.dll    : 4.0.21006.1 (B2Rel.021006-0100)
 dfdll.dll    : 4.0.21006.1 (B2Rel.021006-0100)
 dfshim.dll    : 4.0.30902.0 (Main.030902-0000)

SOURCES
 Deployment url   : file:///C:/Users/Jason/Desktop/appname.appref-ms%7C
      Server  : Microsoft-IIS/7.0
      X-Powered-By : ASP.NET
 Deployment Provider url  : http://mysite.ext/products/multimediaoffice/appname/appname.application

ERROR SUMMARY
 Below is a summary of the errors, details of these errors are listed later in the log.
 * Activation of C:\Users\Jason\Desktop\appname.appref-ms| resulted in exception. Following failure messages were detected:
  + Downloading http://mysite.ext/products/multimediaoffice/appname/Application Files/appname_11_0_0_5/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.

OPERATION PROGRESS STATUS
 * [7/02/2010 8:38:03 PM] : Activation of C:\Users\Jason\Desktop\appname.appref-ms| has started.
 * [7/02/2010 8:38:03 PM] : Performing necessary update check as specified by the deployment.
 * [7/02/2010 8:38:06 PM] : Consuming new update.
 * [7/02/2010 8:38:07 PM] : Installation of the application has started.

ERROR DETAILS
 Following errors were detected during this operation.
 * [7/02/2010 8:38:09 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
  - Downloading http://mysite.ext/products/multimediaoffice/appname/Application Files/appname_11_0_0_5/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.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
   at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
   at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
   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.

为什么此更新功能突然不起作用?我该如何修复它?

更新


自从我创建这个问题以来,我已经完成了自己的小 ftp 客户端,并尝试将上面堆栈跟踪中提到的文件上传到服务器并收到此错误:

远程服务器返回错误: (550) 文件不可用(例如,未找到文件、无法访问)。我不明白这个...以前可以用...但现在不行了?

Ok, so I have an app that checks for updates at http://mysite.ext/sub/sub2/sub3/appname/ and after the very first publish (a few days ago) it was checking for/downloading updates from that url correctly with no problems.

But today, I published a new version, only minor changes to the ui (changing button text etc), then uploaded latest publish to server... Then opened the existing version of my app from my desktop, and it checked for updates, found an update and proceeded to download it, but then failed with this error:

Cannot download the application. The application is missing required files. Contact application vendor for assistance.

I clicked the Details button on that error dialog, and it opened a text file which said:

PLATFORM VERSION INFO
 Windows    : 6.1.7600.0 (Win32NT)
 Common Language Runtime  : 4.0.21006.1
 System.Deployment.dll   : 4.0.21006.1 (B2Rel.021006-0100)
 clr.dll    : 4.0.21006.1 (B2Rel.021006-0100)
 dfdll.dll    : 4.0.21006.1 (B2Rel.021006-0100)
 dfshim.dll    : 4.0.30902.0 (Main.030902-0000)

SOURCES
 Deployment url   : file:///C:/Users/Jason/Desktop/appname.appref-ms%7C
      Server  : Microsoft-IIS/7.0
      X-Powered-By : ASP.NET
 Deployment Provider url  : http://mysite.ext/products/multimediaoffice/appname/appname.application

ERROR SUMMARY
 Below is a summary of the errors, details of these errors are listed later in the log.
 * Activation of C:\Users\Jason\Desktop\appname.appref-ms| resulted in exception. Following failure messages were detected:
  + Downloading http://mysite.ext/products/multimediaoffice/appname/Application Files/appname_11_0_0_5/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.

OPERATION PROGRESS STATUS
 * [7/02/2010 8:38:03 PM] : Activation of C:\Users\Jason\Desktop\appname.appref-ms| has started.
 * [7/02/2010 8:38:03 PM] : Performing necessary update check as specified by the deployment.
 * [7/02/2010 8:38:06 PM] : Consuming new update.
 * [7/02/2010 8:38:07 PM] : Installation of the application has started.

ERROR DETAILS
 Following errors were detected during this operation.
 * [7/02/2010 8:38:09 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
  - Downloading http://mysite.ext/products/multimediaoffice/appname/Application Files/appname_11_0_0_5/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.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
   at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
   at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
   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.

Why is this update feature suddenly not working? How can I fix it?

UPDATE:


Since I created this question I've finished my own little ftp client, and tried to upload the files mentioned in the stacktrace above to the server and got this error:

The remote server returned an error: (550) File unavailable (e.g. file not found, no access). I don't understand this... It was working before... And now it's not?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

本宫微胖 2024-08-27 17:22:52

根据日志,应用程序似乎无法下载清单文件,因为它丢失(错误 404):

http://mysite.ext/products/multimediaoffice/appname/Application Files/appname_11_0_0_5/appname.exe.manifest

您应该验证该文件是否存在于服务器上并且该地址是否可访问。

此地址中还有一个空格 - 应用程序文件。这可能是问题所在吗?

According to the log it seems that the application cannot download the manifest file because it is missing (error 404):

http://mysite.ext/products/multimediaoffice/appname/Application Files/appname_11_0_0_5/appname.exe.manifest

You should verify that this file is present on the server and that this address is accessible.

There's also a space in this address - Application Files. Could this be the problem?

淡笑忘祈一世凡恋 2024-08-27 17:22:52

当您上传新版本时,一定存在某种错误,因为它至少不在服务器上,不在更新系统期望的位置。

There must have been some kind of error when you uploaded the new version, because it isn't on the server, at least, not where the update system expects it to be.

黎夕旧梦 2024-08-27 17:22:52

例外情况似乎是更新服务器不可用(HTTP 404)。再试一次?

引用您的详细信息:

  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)

您可能想尝试通过浏览器检查 URL。您可能还想捕获这种服务器连接异常并告诉用户服务器当前不可用并稍后重试。

The exception seemed to be that the update server was unavailable (HTTP 404). Tried again?

Quoting from your details:

  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)

You might want to try checking the URL via browser. You probably might also want to catch that kind of server connection exception and tell the user that the server is currently unavailable and try again later.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文