7

I have a problem regarding the download of a ClickOnce application. I have succesfully deployed my ClickOnce application to an IIS server. The ClickOnce files are in path on the IIS: /MyApp/install

When i from another machine navigate to the standard publish page of the ClickOnce I can either click "launch" or install. The difference is: - "launch" URL is to ThisIsTheApplication.application file. - install URL is to setup.exe file

When I click the launch file I can succesfully install the apllication. If I use the setup.exe it fails when i try executing that file.

The setup.exe basicly checks whether my prerequiteses are installed or not (only .NET 4.5 for this). The log file says:

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 3 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Microsoft .NET Framework 4.5 (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.51641'
Setting value '4.5.51641 {string}' for property 'DotNet45Full_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4.5 (x86 and x64)':
Property: [DotNet45Full_TargetVersion] = 4.5.51641 {string}
Running checks for command 'DotNetFX45\dotNetFx45_Full_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX45\dotNetFx45_Full_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX45\dotNetFx45_Full_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet45Full_TargetVersion' and value '4.5.50709': true
Result of checks for command 'DotNetFX45\dotNetFx45_Full_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4.5 (x86 and x64)' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697208'
Error: An error occurred trying to download 'https://myurl.com/MyAppFolder/install/ThisIsTheApplication.application'.

Why does the "launch" work and not the setup.exe?

avs099
  • 10,937
  • 6
  • 60
  • 110
  • I have the exact same problem here. My log file look very similar (there are no stack traces or anything in it) and the last two lines are similar. The setup.exe fails, but the .....application URL works ok. I'm on a corporate network/domain and our system adminstrators have been messing alot with security zone policies settings lately. Did you find a solution to the problem? – SteffenSH Jan 07 '14 at 16:31
  • 1
    I did. I got the error when trying to do it from a Window Server 2012 only. It turned out that security restrictions in Server 2012 blocked the setup.exe file from executing. – Kristian Nielsen Jan 09 '14 at 07:50

2 Answers2

3

I had the same problem here. My log file looked very similar (there were no stack traces or anything in it) and the last two lines were similar. The setup.exe failed, but the … .application URL worked ok. I'm on a corporate network/domain and our system administrators had set up a lot of group policies overriding the default security zone settings. The problem was solved by removing the policies and then clicking buttons:
“IE -> Tools -> Internet options -> Security -> Reset all zones to default level”
and “Advanced -> Restore advanced settings”.

SteffenSH
  • 570
  • 1
  • 5
  • 9
  • Good thoughts, but I don't set any policies. The browsers installing this are not under my control (at least, not that I know of). I went ahead and tried pushing the _Reset_ buttons you mention, but no luck there. Thanks, though! – Chuck May 05 '15 at 12:02
0

I've found the following guide here:

http://feedback.veodin.com/knowledgebase/articles/52576-installation-fails-with-error-message-urldownload

  1. Start Microsoft Internet Explorer by pressing Win+R, enter ‘iexplore’ and finally press enter

  2. Go to ‘Tools’ Menu

  3. Make sure to uncheck the mark at ‘Work Offline’

  4. Execute KeyRocket_Setup.exe again

With that said, I think it's easier to create someone's own "clickonce" experience, in order to avoid any interference with Internet Explorer whatsoever.

Valentin Kuzub
  • 11,703
  • 7
  • 56
  • 93