简体   繁体   English

应用程序启动时的C#Windows窗体应用程序更新

[英]C# Windows Forms Application Update on Application Startup

My application has been successfully updating for ages, and I've been making changes, releasing new builds etc every day for the past few months, but now, when the application starts (it checks for updates on startup), it begins downloading the updated version from the server, and then fails 3-quarters of the way through with the following message: 我的应用程序已经成功更新了很长时间,我在过去的几个月里每天都在进行更改,发布新的构建等,但是现在,当应用程序启动时(它会在启动时检查更新),它开始下载更新的来自服务器的版本,然后在四分之三的时间内通过以下消息失败:

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) 平台版本信息Windows:6.1.7600.0(Win32NT)公共语言运行时: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 : file:///C:/Users/Jason/Desktop/OOM.appref-ms%7C Server : Microsoft-IIS/7.0 X-Powered-By : ASP.NET Deployment Provider url : http://www.website.net.au/software/updates/something/OOM.application Application url : http://www.website.net.au/software/updates/something/jusername/Application%20Files/OOM_2_0_0_8/OOM.exe.manifest Server : Microsoft-IIS/7.0 X-Powered-By : ASP.NET 来源部署网址:file:/// C:/Users/Jason/Desktop/OOM.appref-ms%7C服务器:Microsoft-IIS / 7.0 X-Powered-By:ASP.NET部署提供商网址: http:// www .website.net.au / software / updates / something / OOM.application应用程序网址: http//www.website.net.au/software/updates/something/jusername/Application%20Files/OOM_2_0_0_8/OOM.exe.manifest服务器:Microsoft-IIS / 7.0 X-Powered-By:ASP.NET

IDENTITIES Application Identity : OOM.exe, Version=2.0.0.8, Culture=neutral, PublicKeyToken=38928ec70a12c5e6, processorArchitecture=x86, type=win32 IDENTITIES应用程序标识:OOM.exe,版本= 2.0.0.8,Culture = neutral,PublicKeyToken = 38928ec70a12c5e6,processorArchitecture = x86,type = win32

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\\One Stop Management.appref-ms| *激活C:\\ Users \\ Jason \\ Desktop \\ One Stop Management.appref-ms | resulted in exception. 导致例外。 Following failure messages were detected: + Downloading http://www.website.net.au/software/updates/something/jusername/Application Files/OOM_2_0_0_8/One Stop Management.exe.config did not succeed. 检测到以下失败消息:+下载http://www.website.net.au/software/updates/something/jusername/Application Files / OOM_2_0_0_8 / One Stop Management.exe.config未成功。 + The remote server returned an error: (404) Not Found. +远程服务器返回错误:(404)Not Found。

COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected. 组件存储事务故障摘要未检测到事务错误。

WARNINGS There were no warnings during this operation. 警告此操作期间没有警告。

OPERATION PROGRESS STATUS * [18/02/2011 5:55:50 PM] : Activation of C:\\Users\\Jason\\Desktop\\One Stop Management.appref-ms| 操作进度状态* [18/02/2011 5:55:50 PM]:激活C:\\ Users \\ Jason \\ Desktop \\ One Stop Management.appref-ms | has started. 开始了。 * [18/02/2011 5:55:50 PM] : Performing necessary update check as specified by the deployment. * [18/02/2011 5:55:50 PM]:执行部署指定的必要更新检查。 * [18/02/2011 5:55:51 PM] : Consuming new update. * [18/02/2011 5:55:51 PM]:消费新的更新。 * [18/02/2011 5:55:52 PM] : Installation of the application has started. * [18/02/2011 5:55:52 PM]:已开始安装应用程序。 * [18/02/2011 5:55:53 PM] : Processing of application manifest has successfully completed. * [18/02/2011 5:55:53 PM]:应用程序清单的处理已成功完成。 * [18/02/2011 5:55:53 PM] : Found compatible runtime version 4.0.30319. * [18/02/2011 5:55:53 PM]:找到兼容的运行时版本4.0.30319。 * [18/02/2011 5:55:53 PM] : Request of trust and detection of platform is complete. * [18/02/2011 5:55:53 PM]:完成了对信任和平台检测的请求。

ERROR DETAILS Following errors were detected during this operation. 错误详细信息在此操作期间检测到以下错误。 * [18/02/2011 5:55:54 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype) - Downloading http://www.website.net.au/software/updates/something/jusername/Application Files/OOM_2_0_0_8/One Stop Management.exe.config did not succeed. * [18/02/2011 5:55:54 PM] System.Deployment.Application.DeploymentDownloadException(未知子类型) - 正在下载http://www.website.net.au/software/updates/something/jusername/Application Files / OOM_2_0_0_8 / One Stop Management.exe.config没有成功。 - 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.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options) 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, - 来源:System.Deployment - 堆栈跟踪 :System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)在System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState,AssemblyManifest deployManifest,AssemblyManifest appManifest,Uri sourceUriBase,String targetDirectory,String group,IDownloadNotification notification,DownloadOptions选项)处于System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState,ActivationDescription) actDesc,Int64 transactionId,TempDirectory和downloadTemp)在System.Deployment.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Application.Activator.ConsumeUpdatedDeployment(SubscriptionState&subState)中的System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState&subState,ActivationDescription actDesc) 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. ActivationDescription actDesc)在System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(在System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut SubscriptionState&子状态,字符串&errorPageUrl)(字符串shortcutFile,字符串&errorPageUrl,TEMPFILE&deployFile)在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 - 远程服务器返回错误:(404)未找到。 - Source: System - Stack trace: at System.Net.HttpWebRequest.GetResponse() at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next) - 来源:系统 - 堆栈跟踪:在System.Deployment.Application.SystemNetDownloader.DownloadSingleFile的System.Net.HttpWebRequest.GetResponse()处(下一个是DownloadQueueItem)

COMPONENT STORE TRANSACTION DETAILS No transaction information is available. COMPONENT STORE TRANSACTION DETAILS没有可用的交易信息。

Okay, so that tells me that there is a file that was not found. 好的,这告诉我有一个未找到的文件。 But I have double-checked, several times, and the file is there. 但我已经多次检查了几次,文件在那里。

Anybody know what causes this? 谁知道是什么原因造成的?

Any help at all is appreciated! 任何帮助都表示赞赏!

IIS won't serve up *.config files by default to protect web.config and various other ASP configuration files which usually contain connection strings and other sensitive information involved in running the site. 默认情况下,IIS不会提供* .config文件来保护web.config和各种其他ASP配置文件,这些文件通常包含运行站点所涉及的连接字符串和其他敏感信息。 To get around this for Click-Once deployments all files get a .deploy added to the end so a *.config would be automatically renamed *.config.deploy when published. 为了解决这个问题,Click-Once部署所有文件都会添加一个.deploy,以便* .config在发布时自动重命名为* .config.deploy。 Did you manually add One Stop Management.exe.config or something? 您是否手动添加One Stop Management.exe.config或其他内容? You might add a .deploy on the end as a temp workaround but in reality this should have been done for you at publish time. 您可以在最后添加.deploy作为临时解决方法,但实际上这应该是在发布时为您完成的。 You DON'T want enable configs to download from IIS as this will present a security hole with your site. 您不希望从IIS下载启用配置,因为这将为您的站点带来安全漏洞。

I recently solved this exact same problem. 我最近解决了这个完全相同的问题。

We had an application that was at a xyz14 version and we kept making tons of modifications to it to the point where it got up to xyz33 before we released it to our end users. 我们有一个xyz14版本的应用程序,在我们向最终用户发布它之前,我们一直在对它进行大量修改以达到xyz33的程度。 After releasing the live version a handful were unable to upgrade from xyz14 because we had removed the folder for it in the Application Files directory in the ClickOnce deploy. 在发布实时版本后,少数人无法从xyz14升级,因为我们已在ClickOnce部署的Application Files目录中删除了该文件夹。

After using fiddler to see exactly what the HTTP requests were saying I realized that yes indeed the 404 not found error was created because that folder that people needed to update through to the xyz33 and beyond version just wasn't there. 在使用fiddler确切地看到HTTP请求的内容之后,我意识到确实发现了404未找到错误,因为人们需要更新到xyz33及更高版本的那个文件夹就不存在了。 The manifest file that is. 清单文件是。

If this happens to you, hopefully you have a rollback that you can use to add the most recent base version of your application to 'jump start' to the new version. 如果您遇到这种情况,希望您有一个回滚,您可以使用该回滚将应用程序的最新基本版本添加到“快速启动”到新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM