I developed a ClickOnce app for .NET 2.0 and it works just fine. If I hit the install button on the generated publish.html
page or access the application URL https://<host>:<port>/<path>/<app>.application
directly within IE it installs / launches and runs as intended.
To make the start experience better for users I would now like the installation / launch of the application to start right away, without the necessity for the user to click another button or link. Therefore I added the following JavaScript code:
setTimeout(function() {
var iframe = $("<iframe/>")
.attr("id", "autoDownloadFrame")
.attr("src", "https://<host>:<port>/<path>/<app>.application")
.hide();
iframe.appendTo($('body'));
}, 1500);
This code works fine to start, for example, automatical downloads of installers. And it does also work as far as downloading the .application
file for my ClickOnce app. But unforunately the ClickOnce installation / launch does not kick in to start my app.
I thought that might be related to the Content-Type
being set by the web server (using Tomcat 7 with Spring 3.2 here). But even after making sure (and verifying) that the content type is set to application/x-ms-application
the autostart does not happen.
Any hints on why this is the case?
OS: Win7 Enterprise 64 bit, EN
Browser: MSIE 9.0, .NET 2.0 thru 3.5 available (naturally since the click-start works)
Protocol: Tested both HTTP and HTTPS, both with custom ports (8080 and 8443)
Thanks in advance for any hints!
Cheers, Bjorn