查找 HRESULT '-2146697191' 错误消息 - clickonce 设置错误

JPR*_*ddy 2 c# deployment clickonce hresult .net-3.5

我想知道 HRESULT 错误究竟是什么意思?当用户尝试从我们的服务器下载 clickonce 应用程序时,就会发生这种情况。因此,为了弄清楚它背后的问题是什么,我想知道这个 HRESULT 数字指的是什么。我尝试使用错误查找工具,但它说找不到消息。有什么办法可以找到这个错误信息吗?如果 HRESULT 以十进制数给出,如果有人能告诉我如何查找错误消息,那也太好了?

作为参考,这里是简短的错误日志:

Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 5.1.3 {version}
Running checks for package '.NET Framework 3.5 SP1', phase BuildList
Reading value 'SP' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5'
Read integer value 1
Setting value '1 {int}' for property 'DotNet35SP'
The following properties have been set for package '.NET Framework 3.5 SP1':
Property: [DotNet35SP] = 1 {int}
Running checks for command 'DotNetFX35SP1\dotNetFx35setup.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet35SP' and value '1': true
Result of checks for command 'DotNetFX35SP1\dotNetFx35setup.exe' is 'Bypass'
'.NET Framework 3.5 SP1' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697191'
Error: An error occurred trying to download 'https://SomeWebSite.com/SomeApplication.application'
Run Code Online (Sandbox Code Playgroud)

stu*_*rtd 5

HRESULT -2146697191 (0x800C0019) 表示“安全套接字层 (SSL) 证书无效。” 请参阅INET_E_INVALID_CERTIFICATE

  • 这是非常有帮助的。我能够查明问题所在。就我而言,客户端的计算机时间设置为 2011 年(现在是 2018 年),因此所有证书尚未有效。因此,ClickOnce 安装程序抛出了这个异常。修复了时间和问题消失了。具有讽刺意味的是,这个答案是在 2011 年发布的:D (3认同)