ClickOnce - 尝试安装SomeApp时发生错误 [英] ClickOnce - An error occurred attempting to install SomeApp

查看:419
本文介绍了ClickOnce - 尝试安装SomeApp时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ClickOnce曾经变得轻而易举但现在似乎不可能。 大约一个月前,我花了至少一天时间来对抗这个错误,然后得出我必须购买代码签名证书的结论。 我做了,并用一根usb棒接收了它。 
我安装了供应商的说明。 然后我回到了VS 2017解决方案,项目属性/签名选项卡,并从商店中选择了我的新证书。 现在当我发布clickonce项目时,我提示我在安装证书时使用的密码是
4倍。 但是,完成后,"publish.htm"将被发布。页面弹出,我点击运行按钮... ...我从一个月前得到相同的错误。 这是日志中的错误
引用我的信息:

已设置以下属性:
属性:[AdminUser] = true {boolean}
属性:[InstallMode] = HomeSite {string}
属性:[NTProductType] = 1 {int}
属性:[ProcessorArchitecture] = AMD64 {string}
属性:[VersionNT] = 10.0.0 {version}
运行检查包'Microsoft .NET Framework 4.7(x86和x64)',阶段BuildList
读取注册表项'HKLM'的值'Release' \\ Software \ Microsoft \ NET Framework Setup\NDP\v4 \Full'
读取整数值460798
设置值'460798 {int}'属性'DotNet47Full_Release'
阅读注册表项'HKLM \ SOFTWARE \ Microsoft /\\ NET Framework Setup \OS Integration'的值'v4'
读取整数值1
为属性'DotNet47Full_OSIntegrated'设置值'1 {int}'
以下属性为包'Microsoft .NET Framework 4.7(x86和x64)'设置:
属性:[DotNet47Full_OSIntegrated] = 1 {int}
属性:[DotNet47Full_Release] = 460798 {int}
运行检查for命令'DotNetFX47 \ NDP47-KB3186497-x86-x64-AllOS-ENU.exe'
在属性'InstallMode'和值'HomeSite'上运行运算符'ValueEqualTo'的结果:true
检查结果命令'DotNetFX47 \ NDP47-KB3186497-x86-x64-AllOS-ENU.exe'是'旁路'
运行检查命令'DotNetFX47 \NDP47-KB3186500-Web.exe'
结果在属性'InstallMode'上运行运算符'ValueNotEqualTo'并且值'HomeSite':false
在属性'DotNet47Full_Release'和值'460798'上运行运算符'ValueGreaterThanEqualTo'的结果:true
检查命令的结果' DotNetFX47 \ NDP47-KB3186500-Web.exe'是'绕过'
'Microsoft .NET Framework 4.7(x86和x64)'运行检查结果:无需安装
启动应用程序。
URLDownloadToCacheFile因HRESULT失败'-2146697211'
错误:尝试下载'http://xxxx/xxxx/WpfDeployment/xxxx.application'时出错。

好吧,也许它与从浏览器运行有关。 所以我去windows explorer到clickonce创建的setup.exe,右键单击/以管理员身份运行,我得到同样的错误。


我甚至去了这个页面来修改注册表  https://msdn.microsoft.com/en-us/library/ee308453.aspx?f=255&MSPPError=-2147217396


但这没有帮助。 我无法相信MS会让这么困难。 有人可以在这里借一些帮助吗?


谢谢。



解决方案

您好moondaddy,


>> URLDownloadToCacheFile因HRESULT'-2146697211'而失败


如果用户设置了Internet Explorer高级安全性选项,则"如果在安全模式和非安全模式之间进行更改,则发出警告"在部署目标计算机上,如果正在安装的ClickOnce应用程序的安装URL从非安全
重定向到安全站点(反之亦然),安装将失败,因为Internet Explorer警告会中断它


ClickOnce used to be a breeze but now it seems impossible.  About a month ago I spent at least a day battling this error before coming to the conclusion that I had to buy a code signing certificate.  I did, and received it on a usb stick.  I went through the instructions with vendor as I installed it.  Then I went back to the VS 2017 solution, project properties/Signing tab and selected my new certificate from the store.  Now when I publish the project for clickonce I'm prompted about 4 times for the password I used when I installed the cert.  However, upon completion the "publish.htm" page pops up and I click the run button... and... I get the same error from a month ago.  Here's the info from the log which the error referred me to:

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 10.0.0 {version}
Running checks for package 'Microsoft .NET Framework 4.7 (x86 and x64)', phase BuildList
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Read integer value 460798
Setting value '460798 {int}' for property 'DotNet47Full_Release'
Reading value 'v4' of registry key 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\OS Integration'
Read integer value 1
Setting value '1 {int}' for property 'DotNet47Full_OSIntegrated'
The following properties have been set for package 'Microsoft .NET Framework 4.7 (x86 and x64)':
Property: [DotNet47Full_OSIntegrated] = 1 {int}
Property: [DotNet47Full_Release] = 460798 {int}
Running checks for command 'DotNetFX47\NDP47-KB3186497-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX47\NDP47-KB3186497-x86-x64-AllOS-ENU.exe' is 'Bypass'
Running checks for command 'DotNetFX47\NDP47-KB3186500-Web.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet47Full_Release' and value '460798': true
Result of checks for command 'DotNetFX47\NDP47-KB3186500-Web.exe' is 'Bypass'
'Microsoft .NET Framework 4.7 (x86 and x64)' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697211'
Error: An error occurred trying to download 'http://xxxx/xxxx/WpfDeployment/xxxx.application'.

OK, maybe it has something to do with running from a browser.  so I go to windows explorer to the setup.exe created by clickonce, right click/run as administrator and I get the same error.

I even went to this page to modify the registry https://msdn.microsoft.com/en-us/library/ee308453.aspx?f=255&MSPPError=-2147217396

but this did not help.  I can't believe MS makes this so difficult.  Can someone please lend some help here?

Thank you.

解决方案

Hi moondaddy,

>>URLDownloadToCacheFile failed with HRESULT '-2146697211'

If a user has set Internet Explorer Advanced Security option "Warn if changing between secure and not secure mode" on the deployment target computer, and if the setup URL of the ClickOnce application being installed is redirected from a non-secure to a secure site (or vice-versa), the installation will fail because the Internet Explorer warning interrupts it.


这篇关于ClickOnce - 尝试安装SomeApp时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆