Download ClickOnce fails from setup.exe

℡╲_俬逩灬. 提交于 2019-12-10 03:57:55

问题


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?


回答1:


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”.




回答2:


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.



来源:https://stackoverflow.com/questions/20244507/download-clickonce-fails-from-setup-exe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!