Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download ClickOnce fails from setup.exe

Tags:

iis

clickonce

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?

like image 640
Kristian Nielsen Avatar asked Nov 27 '13 14:11

Kristian Nielsen


People also ask

How do I enable ClickOnce?

To enable ClickOnce security settings With a project selected in Solution Explorer, on the Project menu, click Properties. Click the Security tab. Select the Enable ClickOnce Security Settings check box. You can now customize the security settings for your application on the Security page.

What is the difference between ClickOnce and Windows Installer?

Windows Installer deployment requires administrative permissions and allows only limited user installation; ClickOnce deployment enables non-administrative users to install and grants only those Code Access Security permissions necessary for the application.

How do I install prerequisites with ClickOnce application?

Click the Prerequisites button to open the Prerequisites dialog box. In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components check box is selected. In the Prerequisites list, check the components that you wish to install, and then click OK.


1 Answers

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

like image 172
SteffenSH Avatar answered Oct 20 '22 15:10

SteffenSH