我需要在一键式应用程序中更改 app.config.exe 中的数据库配置。在 MageUI 中创建部署时,我查找了一些信息。 http://danielbergsten.wordpress.com/2010/12/21/change-application-configuration-in-an-already-published-clickonce-app/ http://community.discountasp.net/showthread.php?t= 14370 https://stackoverflow.com/questions/7082410/clickonce-setup-exe-fails-but-the-application-file-works-fine-when-using-a-wind 我发现这个链接似乎最直接但我也没有通过点击这个链接摆脱我的错误。 ClickOnce 和 mageUI 添加自定义文件夹问题。实际上,这正是我在解决方案中寻找的,除了给定链接中的解决方案对我不起作用。
I)我尝试了几种组合,看看它是否有效。1)在应用程序版本文件夹中签署清单。(.manfest 文件)2)在根文件夹中签名应用程序部署并使用新签名的清单(.application)3)将其复制到应用程序版本。
II) 1) 在应用程序版本文件夹中签名清单。(.manfest 文件) 2) 使用新清单签署应用程序部署。3) 将应用程序部署复制到应用程序版本,然后使用应用程序文件夹中的新清单再次对其进行签名。
III) 1) 签署清单并检查添加.deploy。2) 在根文件夹中签署应用程序部署。3) 将应用程序部署复制到应用程序文件夹。
我在解决我遇到的错误方面没有任何运气。我得到的错误是当我尝试从 DEV Web 服务器环境运行一个应用程序时。我收到 404 错误,并且找不到配置文件。如果我从 VS 发布应用程序,效果很好。问题是我只需要更改生产数据库值,我不想从 VS2010 发布,我只想直接从生产中使用 .exe 和配置,只需更改配置并使用 MageUI 退出所有内容。我正在尝试在 DEV 环境中进行辞职,以查看在部署到 DEV 时辞职是否有效,以便我可以在生产中执行相同的步骤。辞职后DEV部署失败。请不要建议法师,因为我只是无法将法师作为命令行运行,尽管我想知道我该怎么做。我试过了,我找不到法师,但 MageUI 效果很好。我不确定我在这里缺少什么步骤。这是我尝试使用部署它的网络服务器打开这个一键式应用程序链接时的完整错误堆栈跟踪。
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.17929
System.Deployment.dll : 4.0.30319.17929 built by: FX45RTMREL
clr.dll : 4.0.30319.17929 built by: FX45RTMREL
dfdll.dll : 4.0.30319.17929 built by: FX45RTMREL
dfshim.dll : 4.0.41209.0 (Main.041209-0000)
SOURCES
Deployment url : http://dev/pfs/priority/DEV/PriorityWinApp-DEV.application
Server : Microsoft-IIS/7.5
X-Powered-By : ASP.NET
Application url : http://dev/pfs/priority/DEV/Application%20Files/PriorityWinApp-DEV_1_0_3_128/PriorityWinApp-DEV.exe.manifest
Server : Microsoft-IIS/7.5
X-Powered-By : ASP.NET
IDENTITIES
Deployment Identity : PriorityWinApp-DEV.application, Version=1.0.3.128, Culture=neutral, PublicKeyToken=2c3d7f3ec71aa887, processorArchitecture=msil
Application Identity : PriorityWinApp-DEV.exe, Version=1.0.3.128, Culture=neutral, PublicKeyToken=2c3d7f3ec71aa887, processorArchitecture=msil, type=win32
APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://dev/pfs/priority/DEV/PriorityWinApp-DEV.application resulted in exception. Following failure messages were detected:
+ Downloading http://dev/pfs/priority/DEV/Application Files/PriorityWinApp-DEV_1_0_3_128/PriorityWinApp-DEV.exe.config 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
* [5/26/2013 12:22:07 PM] : Activation of http://dev/pfs/priority/DEV/PriorityWinApp-DEV.application has started.
* [5/26/2013 12:22:07 PM] : Processing of deployment manifest has successfully completed.
* [5/26/2013 12:22:07 PM] : Installation of the application has started.
* [5/26/2013 12:22:07 PM] : Processing of application manifest has successfully completed.
* [5/26/2013 12:22:09 PM] : Found compatible runtime version 4.0.30319.
* [5/26/2013 12:22:09 PM] : Request of trust and detection of platform is complete.
ERROR DETAILS
Following errors were detected during this operation.
* [5/26/2013 12:22:10 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://dev/pfs/priority/DEV/Application Files/PriorityWinApp-DEV_1_0_3_128/PriorityWinApp-DEV.exe.config 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.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.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.