Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/271.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从网址下载更新。C#_C#_Winforms_Stack Trace - Fatal编程技术网

从网址下载更新。C#

从网址下载更新。C#,c#,winforms,stack-trace,C#,Winforms,Stack Trace,好的,我有一个应用程序,在第一次发布时(几天前)和发布后检查更新,它正确地从该url检查/下载更新,没有问题 但今天,我发布了一个新版本,只对ui做了一些小的更改(更改按钮文本等),然后将最新发布上传到服务器上。。。然后从我的桌面打开我的应用程序的现有版本,它检查更新,找到更新并继续下载,但由于以下错误而失败: Cannot download the application. The application is missing required files. Contact applicati

好的,我有一个应用程序,在第一次发布时(几天前)和发布后检查更新,它正确地从该url检查/下载更新,没有问题

但今天,我发布了一个新版本,只对ui做了一些小的更改(更改按钮文本等),然后将最新发布上传到服务器上。。。然后从我的桌面打开我的应用程序的现有版本,它检查更新,找到更新并继续下载,但由于以下错误而失败:

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客户端,并尝试将上面stacktrace中提到的文件上载到服务器,但出现以下错误:

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

远程服务器返回错误:(550)文件不可用(例如,找不到文件,无法访问)。我不明白这个。。。它以前是工作的。。。现在不是了?

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

您应该验证服务器上是否存在此文件,以及是否可以访问此地址


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

上载新版本时一定发生了某种错误,因为它不在服务器上,至少不在更新系统预期的位置。

例外情况似乎是更新服务器不可用(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。您可能还希望捕获此类服务器连接异常,并告诉用户服务器当前不可用,然后稍后重试。

我查看了我的服务器,所有目录/子目录都在那里。我将发布文件夹中的所有文件与服务器上的所有文件进行了匹配。。。可能是别的什么吗?上面的stacktrace说它下载appname.exe失败。清单没有成功,但它在我的服务器上。。。更新服务器最近有什么变化吗?IIS更新可能吗?另外,请尝试检查文件的读取权限,它们可能以某种方式被设置为不允许远程访问。谢谢。。。但我知道为什么会这样。。。我有两个地址可以用来上传文件到服务器,一个ftp地址和一个辅助ftp地址。出于某种奇怪的原因,我需要使用第二个ftp地址。在我把它们重新上传到第二个ftp地址后,它现在就开始工作了。我不明白为什么这会引起问题,因为整个更新功能在过去几天前才起作用。今天它突然停止工作了。我刚刚尝试再次上传发布,请查看上面编辑的问题以了解新错误:)