【问题标题】:ClickOnce application is not installing with HTTPS URLClickOnce 应用程序未使用 HTTPS URL 安装
【发布时间】:2018-03-15 10:44:51
【问题描述】:

我正在使用 HTTPS 设置 url 发布我的应用程序并将其托管到 HTTPS url。

当我运行setup.exe 时发生错误。

An error occurred trying to download 'https://***.tjc.tv/WMSClient.application'.

See the setup log file located at 'C:\Users\mkumawat\AppData\Local\Temp\VSD3796.tmp\install.log' for more information.

日志文件

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Windows Installer 3.1', phase BuildList
The following properties have been set for package 'Windows Installer 3.1':
Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
'Windows Installer 3.1' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697202'
Error: An error occurred trying to download 'https://***.tjc.tv/WMSClient.application'.

当我在浏览器中手动下载此 https://***.tjc.tv/WMSClient.application 时,它正在下载并且工作正常,但在 setup.exe 中它无法正常工作。

我已经尝试了以下解决方案,但没有任何效果。

  1. 启用 - 在 Internet 选项的自定义级别启动应用程序和不安全文件。
  2. 取消选中 - 如果在 Internet 选项的高级选项卡中在安全模式和非安全模式之间切换时发出警告。
  3. 在 VS 的项目属性中签署 ClickOnce 清单

但是这些都失败了,没有任何效果。

只有 HTTPS 而不是 HTTP 会出现此问题。 HTTP 工作正常,但我需要使用 HTTPS。

SSL 证书有效。

任何人都知道这件事。

【问题讨论】:

  • 能把下载代码放上来吗?
  • 我还没有写下载代码。它在 setup.exe 下。

标签: c# winforms https clickonce


【解决方案1】:

在我们的系统上 setup.exe 也失败了,错误为 URLDownloadToCacheFile failed with HRESULT '-2146697208',而当单击 ourapp.application 链接或启动下载的文件时,应用程序安装没有问题。

如果我们将安装源从 HTTPS 更改为 HTTP,我们就可以使用 setup.exe 进行安装。

我们的解决方案是重新启用 HTTPS 页面的缓存。由于 setup.exe 使用的是 WinInet,因此可以通过 IE 进行 Internet 设置更改。

  1. 在 Internet Explorer 中,转到工具/Internet 选项
  2. 切换到“高级”选项卡并向下滚动到“安全”部分。
  3. 取消选中“不要将加密的页面保存到磁盘”项。

由于大多数流量都转移到了 HTTPS,所以这个安全功能对我来说已经没有多大意义了

【讨论】:

  • 这对我们有用,但我确实发现设置可能有点小问题。具体来说,效果在一段时间后停止工作,直到我重新启用它(点击应用)然后再次禁用它(然后再次点击应用)。
猜你喜欢
  • 1970-01-01
  • 2018-01-02
  • 2012-06-25
  • 1970-01-01
  • 2011-10-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多