C# Clickonce安装下载失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19245020/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Clickonce installation fails to download
提问by Sreenath Ganga
I had made a Clickonce deployemnt to my application set the installation folder and publishing folder the same that is a network share and then it work perfect for my development machine Then when I went to on client machine opened the network share and I tried to install the application using that setup file i got tht message like below
我已经对我的应用程序进行了 Clickonce deployemnt,将安装文件夹和发布文件夹设置为与网络共享相同的文件夹,然后它非常适合我的开发机器然后当我在客户端机器上打开网络共享时,我尝试安装使用该安装文件的应用程序我收到了如下所示的消息
And in details Iam getting the below message
并详细我收到以下消息
LATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.586
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.586 (RTMLDR.030319-5800)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file://it-dept/Project/mycutorderlast/CutorderFresh.application
Deployment Provider url : http://it-dept/CutorderFresh/CutorderFresh.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \it-dept\Project\mycutorderlast\CutorderFresh.application resulted in exception. Following failure messages were detected:
+ Downloading http://it-dept/CutorderFresh/CutorderFresh.application 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
* [08/10/2013 14:03:25] : Activation of \it-dept\Project\mycutorderlast\CutorderFresh.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [08/10/2013 14:03:30] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://it-dept/CutorderFresh/CutorderFresh.application 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.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
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.
Can anyone suggest what was the issue As Iam using clickonce for the first time
任何人都可以提出问题,因为我第一次使用 clickonce
采纳答案by Ivan Leonenko
Check values of 'Publish Location' or 'Installation URL' on Publish tab of properties. According to your current settings, you should have published files accessible by this path: http://it-dept/CutorderFresh/CutorderFresh.application
and it looks like they're not available by this path.
检查属性的“发布”选项卡上“发布位置”或“安装 URL”的值。根据您当前的设置,您应该已经发布了可通过此路径访问的文件:http://it-dept/CutorderFresh/CutorderFresh.application
并且看起来它们无法通过此路径访问。
Here you can read how to set proper 'Publish Location' and 'Installation URL' values
回答by jaredbaszler
I had this same issue and it was driving me mad. I knew I had the proper permissions set up on the network's shared folder. I couldn't even install my application from my own machine via the network share. After searching long and hard for an answer I figured it out myself.
我有同样的问题,这让我很生气。我知道我在网络的共享文件夹上设置了适当的权限。我什至无法通过网络共享从我自己的机器上安装我的应用程序。经过长时间的努力寻找答案后,我自己弄明白了。
On the Publish tab of properties I only filled in the "Publishing Folder Location" with:
在属性的发布选项卡上,我只填写了“发布文件夹位置”:
\servername\share\Application Folder
\servername\share\Application 文件夹
I left the "Installation Folder URL" section blank.
我将“安装文件夹 URL”部分留空。
Somehow a field in the "Application Updates" section (via clicking "Updates" button on Publish tab) got filled in with a different value than what my network share was. Not sure if I did this myself or if it was set by default. I cleared out the "Update Location (if different than the publish location)" field and that fixed this issue for me. Here is a screen shot of where I changed the field:
不知何故,“应用程序更新”部分中的一个字段(通过单击“发布”选项卡上的“更新”按钮)填充了与我的网络共享不同的值。不确定是我自己做的还是默认设置的。我清除了“更新位置(如果与发布位置不同)”字段并为我解决了这个问题。这是我更改字段的屏幕截图:
I would post a screen shot of the form that was causing me trouble but for some reason I need 10 reputation points to post a picture.
我会张贴一张给我带来麻烦的表格的屏幕截图,但出于某种原因,我需要 10 个声望点来张贴图片。
回答by kichaji
I resolved my problem like yours.
我像你一样解决了我的问题。
I don't know that "Publishing Folder Location" of my application (below "formtest" App.) is different from "Installation Folder URL".
我不知道我的应用程序的“发布文件夹位置”(在“formtest”应用程序下方)与“安装文件夹 URL”不同。
In fact, two folders of former WEB server for click once deployment were not different. So, I was confused after WEB server was changed.
实际上,以前用于单击一次部署的 WEB 服务器的两个文件夹并没有什么不同。所以,改WEB服务器后,我很困惑。
Publishing Folder Location: \12.39.526.272\root\formtest\
Installation Folder URL: http://12.39.526.272:8080/formtest/
Application Updates section "Update Location (if different than the publish location)" field : http://12.39.526.272:8080/formtest/
发布文件夹位置:\12.39.526.272\root\formtest\
安装文件夹网址:http: //12.39.526.272: 8080/formtest/
应用程序更新部分“更新位置(如果不同于发布位置)”字段:http: //12.39.526.272: 8080/formtest/
I'm so sorry My native language is not English.
我很抱歉我的母语不是英语。
回答by Loki70
I had the same error, but resolved it a different way. Somehow I had accidentially unchecked something in the Options.
我有同样的错误,但以不同的方式解决它。不知何故,我不小心取消了选项中的某些内容。
On the Publish tab, select "Options". Under Deployment, make sure "Use .deploy file extension" is checked. Once I checked that and republished, the error went away.
在“发布”选项卡上,选择“选项”。在部署下,确保选中“使用 .deploy 文件扩展名”。一旦我检查并重新发布,错误就消失了。