URLDownloadToCacheFile failed with HRESULT '-2146697208'
Asked Answered
R

5

6

I am I am having a problem installing a ClickOnce vb.net windows forms application. I have tried few solutions suggested here on this site and none have helped.

My application is built with VS2010(.NET 4.0 Framework) and is deployed to a local folder C:\inetpub\wwwroot\AppName on my dev machine but I have specified the following address as the install address https://localhost/AppName/

I am getting following error when I hit "Run" button in IE. "Warn if changing between secure to non secure mode" is unchecked in IE. Any help with this will be greatly appreciated. Complete error message can be seen below.

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'
Rosenkranz answered 17/4, 2017 at 12:28 Comment(2)
Try reading stackoverflow.com/help/mcveCabbageworm
This was resolved after setting the Installation url to the correct URL. I was including "publish.htm" in the URL which was causing the issue.Rosenkranz
U
19

On our systems, when running setup.exe, if the codebase URL in deploymentProvider was set to http, it worked, but https failed with URLDownloadToCacheFile failed with HRESULT '-2146697208'. However, the ourapp.application file would be downloaded.

It turns out that SSL caching was disabled, the following registry change fixed the issue.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"DisableCachingOfSSLPages"=dword:00000000
Unstable answered 11/6, 2018 at 16:55 Comment(3)
Thanks for the information. This might help others who are facing similar issue.Rosenkranz
This is exactly my problem. A noob question, but where these changes needs to be done? On app hosting server or on all client machines?Fontana
The client needs this change.Unstable
V
0

I received the same error while deploying to a client system. After several different attempts with different URLs and settings, I attempted to install on my development system and was successful. I then concluded: "If there is no other logical explanation, reboot the system". I was then successful installing the same version that installed on my development system on the client's.

Client system OS: Windows 10.

Ventilate answered 22/1, 2018 at 18:37 Comment(1)
Thanks. This may help others who are facing similar issue.Rosenkranz
E
0

This error usually occurs due to settings in Internet Explorer. Open IE > Options > Security tab. Try add URL to Trusted Sites or lower security settings for Local Intranet.

Emissary answered 15/2, 2020 at 18:19 Comment(0)
S
0
  1. Right click on setup.exe file
  2. Click Troubleshoot compatibility
  3. Click Try Recommended Settings
  4. Click Test the Program
  5. Click INSTALL
Shorter answered 10/9, 2022 at 6:43 Comment(0)
E
0

Although this is an old question, I wanted to say which method solved my issue, but I guess it is a temporary solution.

I looked at the error log file that setup.exe indicated its location in the error window and copy the url address which the application needs to be installed from: {...app}.application

Pasted the address to browser, it is downloaded and I was be able to install the app successfully.

Errantry answered 21/2, 2024 at 15:4 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.