URLDownloadToCacheFile因HRESULT'-2146697208而失败'

时间:2017-04-17 12:28:23

标签: .net windows forms deployment clickonce

我在安装ClickOnce vb.net Windows窗体应用程序时遇到问题。我在这个网站上尝试了一些解决方案,没有人帮助过。

我的应用程序是使用VS2010(.NET 4.0 Framework)构建的,并部署到我的开发计算机上的本地文件夹C:\ inetpub \ wwwroot \ AppName,但我已将以下地址指定为安装地址https://localhost/AppName/

当我点击IE中的“运行”按钮时,我收到以下错误。 “如果在安全模式和非安全模式之间进行更改,则会在IE中取消选中”。 任何有关这方面的帮助将不胜感激。完整的错误消息可以在下面看到。

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.1 {version}
Running checks for package 'Microsoft .NET Framework 4 (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Read string value '4.5.51209'
Setting value '4.5.51209 {string}' for property 'DotNet40Full_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4 (x86 and x64)':
Property: [DotNet40Full_TargetVersion] = 4.5.51209 {string}
Running checks for command 'DotNetFX40\dotNetFx40_Full_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX40\dotNetFx40_Full_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Full_TargetVersion' and value '4.0.30129': true
Result of checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4 (x86 and x64)' RunCheck result: No Install Needed
Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'
Read string value '4.5.51209'
Setting value '4.5.51209 {string}' for property 'DotNet40Client_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':
Property: [DotNet40Client_TargetVersion] = 4.5.51209 {string}
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697210'
Error: An error occurred trying to download 'http://MachineName:90/publish.htm/AssemblyName.application'

3 个答案:

答案 0 :(得分:0)

我在部署到客户端系统时收到了同样的错误。在使用不同的URL和设置进行了几次不同的尝试后,我尝试在我的开发系统上安装并成功完成。然后我得出结论:“如果没有其他逻辑解释,请重启系统”。然后我成功安装了在我的开发系统上安装的相同版本的客户端。

客户端系统操作系统:Windows 10。

答案 1 :(得分:0)

通常由于Internet Explorer中的设置而发生此错误。打开IE>选项>安全选项卡。尝试将URL添加到“受信任的站点”或将本地Intranet的安全性设置降低。

答案 2 :(得分:-1)

在我们的系统上,运行setup.exe时,如果deploymentProvider中的代码库URL设置为http,则可以正常工作,但https失败并显示URLDownloadToCacheFile failed with HRESULT '-2146697208'。但是,将下载ourapp.application文件。

事实证明,SSL缓存已被禁用,以下注册表更改解决了该问题。

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"DisableCachingOfSSLPages"=dword:00000000