Compartir a través de


ClickOnce and FireFox

Firstly sorry for the delay in this messaging from ClickOnce. Judging by the passionate opinions I have heard around the community on this issue, this is a blog we should have posted a while back.

[Hanselman's Blog - https://www.hanselman.com/blog/PermaLink.aspx?guid=7ce42ccd-e531-4d43-a93f-73483c0afd3d]
[Sven Groot's Blog - https://channel9.msdn.com/ShowPost.aspx?PostID=138273]

[Lady bug - https://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=5b309bf8-370d-4571-8ce2-aaebb525488b ]

Geting to business; In the V2.0 release of the Framework, ClickOnce does not have support for FireFox. 
-    I do discuss later in this post how application publishers can use the ClickOnce shortcut files to allow FireFox users to install Clickonce applications.

ClickOnce does work on machines where FireFox is the default browser, if the user clicks on the deployment manifest in IE.
-    There is an issues users hit here if their application carries a bootstrapper package, again a workaround is mentioned later in the post.
 
And yes we are actively looking into remedying this in the next release of the Framework.

What happens when I click on a ClickOnce deployment in FireFox?

ClickOnce provides an implemention of the IE mime handler interface for the mime type application/x-ms-application which is associated with .application files on servers hosting ClickOnce application. Hence when a user clicks on a .application in IE our mime handler is invoked which downlods the .application file and fires up the ClickOnce install.

When a user clicks on a .application in FireFox the FireFox equivalent of the Open/Save dialog comes up. Once the .application file is downloaded to the local macine (to the FireFox cache on Open and to a user specified location on Save) it is run form there firing up ClickOnce. ClickOnce now parses the locally downloaded .application and tries to download the actual application manifest it refers to. If the .application contains a relative path to the application manifest ClickOnce will try to find it relative to the .application in the FireFox temp folder and fail. If it is a full Url to the application manifest ClickOnce fails anyway, this time due to a security check we have that does not allow the .application and the corresponding application bits to be in different security zones.

There have been Plugins written by the FireFox community
[e.g. https://www.softwarepunk.com/cohelper/] where they parse the application after it has been downloaded and read the deploymentProvider Url from it. They then use the undocumented Apis for invoking ClickOnce with the URL as a parameter [rundll32 dfshim.dll,ShOpenVerbApplication URL ]. I have never tried the approach above, but would believe it works.
 
From the ClickOnce teams perspective we would advise users against parsing the ClickOnce manifest and relying on its format for we could inadvertently break you in future manifest updates. Also since the <deploymentProvider> tag is only needed in Shell Visible installed ClickOnce applications this solution does not work for Online ClickOnce Apps.

For out next release we are looking into what we can do to provide a simple public way for the FireFox community to build plugins for ClickOnce support. Stay tuned ...
 

How do ClickOnce Shortcuts help me get ClickOnce support on FireFox?

Anytime a shell visible installed ClickOnce App is downloaded to a machine, we create a ClickOnce shortcut (.AppRef-MS) for the application under Progrmas->Publisher->Product.AppRef-MS.
The contents of this shortcut file look something like this -https://Foo/Bar/Dummy.Application#Dummy.app, Culture=neutral, PublicKeyToken=XXXXXXXXXXXX, processorArchitecture=msil
As you can see it contains the Url to the .application and the identity of the deployment manifest modulo version.

These ClickOnce shortcuts are designed so that they can be emailed to people and when ckicked on, on a machine which does not have the corrsponding application already installed they cause the application to be installed and launched.

Now asuming you have an ClickOnce application (Shell Visible Installed App - Not an Online App) you want to publish to your clients who use FireFox, all you need to do is generate the shortcut file and publish it on your server (If you have both IE and FireFox users you could have a seperate link saying "FireFox users click here" so that IE users still get the default behavior). Once the user click on an .appref-MS in FireFox the Open/Save dialog comes up. Once the .appref-MS has been downloaded to the local machine and run it will invoke ClickOnce, which in turn will download the .application from the URL specified in the shortcut and install the App.

This solution works with out any FireFox changes. Remember though that .appref-MS files can only be generated for Shell Visible Installed ClickOnce Apps.

What about client machines where FireFox is the default browser but the user clicks on the .application in IE?

This scenario just works.

There is one caveat though. If your Application carries a bootstrapper along with it to install prerequisites before the actual ClickOnce install, then your scenario might be broken. The bootstrapper after it has installed the prerequisites starts the actual ClickOnce install by launching the .application URL in the default browser (in this case FireFox) even if the user had originally clicked on an IE session to launch the bootstrapper.

There however is a easy workaround for this [https://channel9.msdn.com/ShowPost.aspx?PostID=138879] which I have recommended to users earlier with good success.

 

Again in closing let me reitterate, we are actively working on having a better XBrowser story for our next release.

Comments are welcome as usual.

Comments

  • Anonymous
    March 01, 2006
    The comment has been removed

  • Anonymous
    March 01, 2006
    Glad you like the technology and we do feel your pain with our lack of XBrowser support.

    We would like to have ClickOnce XBrowser support enabled at the earliest. However it is a bit premature for me to comment on when exactly this will be and what the vehicle will be.  

  • Anonymous
    March 02, 2006
    Saurabh Pant is posting tons of great information about ClickOnce these days. Today, he has a great article...

  • Anonymous
    March 02, 2006
    The comment has been removed

  • Anonymous
    March 03, 2006
    The comment has been removed

  • Anonymous
    March 14, 2006
    Unbelievable that some manager would cut Xbrowser support from the release.  Not having major browser support render ClickOnce useless. Having professional looking/working installs is so important.

    "And yes we are actively looking into remedying this in the next release of the Framework".
    A proactive company that supports their customers would put out a patch for this; Instead of just considering it for a future non-scheduled release.

  • Anonymous
    March 17, 2006
    I'm also quite shocked to see how much of a burden it is when your default browser is Firefox.

    Not only you need to have 2 seperate links, but even if you create a setup it will launch the .application...in the default browser! which doesn't work either!

    I really hope it's going to be fixed soon

  • Anonymous
    March 22, 2006
    In fact ClickOnce deployment partially works with FireFox.
    See more details :
    https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&category=Download%20Tools&numpg=10&id=1608
    For another Browser like Opera :

    The next step is to make Opera pass the url to the .application file format to EXPLORER. I would pass this to the appropriate file to run it, but then it won't be in the right context so we'll settle for a little dodgyness.

    Click Tools, Preferences, Advanced, Downloads then add a new mime type of application/x-ms-application with an extension of application, then check "Open with other application", enter "explorer.exe" and check "Pass web address directly to application".

    Best Regards

  • Anonymous
    May 03, 2006
    This is a major show stopper for using ClickOnce for us.  Without XBrowser support ClickOnce is useless.

  • Anonymous
    May 04, 2006
    I agree about it being a show stopper. I found out about this when I was trying to convince some google-loving firefox fan how great ClickOnce was for quick deployment of real desktop applications. Boy was my face red.

    How could you not test firefox! Geez guys Steve Ballmer better send out a memo letting you all know the days of assuming IE are over. Like it or not.

  • Anonymous
    May 17, 2006
    Es hat einige Zeit gedauert bis Microsoft eine Alternative f&#252;r das Deployment von lokalen Anwendungen per Web Browser hatte. In der Java Welt gibt es hierf&#252;r Java Web Start, das mittels JNLP Protokoll erlaubt einen lokalen Cache zu f&#252;llen,

  • Anonymous
    May 22, 2006
    Friends of Client Development Newsletter – April 2006    WinForms Website UpdatedIf you’ve been to http://www.windowsforms.net...

  • Anonymous
    May 27, 2006
    Software Punk now have a FireFox extension called FFClickOnce: http://www.softwarepunk.com/ffclickonce/ . It handles ClickOnce deployment in FireFox :-)

  • Anonymous
    June 05, 2006
    In the "How do ClickOnce Shortcuts help me get ClickOnce support on FireFox?" section, Saurabh says "..., all you need to do is generate the shortcut file and publish it on your server...".
    How do I generate the shortcut file?

  • Anonymous
    October 25, 2006
    Has Microsoft considered creating a stand-alone application to handle the ClickOnce deployment?  Java provides the Java Web Start Launcher application that handles the .jnlp (application/x-java-jnlp-file) file type.

  • Anonymous
    October 29, 2006
    Automatically Updating Applications (ClickOnce vs. ClickThrough)

  • Anonymous
    October 30, 2006
    Scott Hanselman Corillian Corporation April 7, 2006 Summary: In the belated seventh installment of the

  • Anonymous
    October 31, 2006
    Summary: In the belated seventh installment of the "Some Assembly Required" column, Scott Hanselman extends,

  • Anonymous
    January 26, 2007
    PingBack from http://www.belshe.com/2007/01/26/outlook-addins-net-11-20-or-vsto/

  • Anonymous
    February 02, 2007
    PingBack from http://www.do-ict.nl/2007/02/02/wikipedia-explorer-beta/

  • Anonymous
    March 21, 2007
    PingBack from http://www.hanselman.com/blog/ABetterWayForClickOnceAndFireFox.aspx

  • Anonymous
    April 10, 2007
    PingBack from http://clickonce.blog4you.com/2006/12/07/deploy-and-update-your-smart-client-projects-using-a-central-server/

  • Anonymous
    March 27, 2008
    PingBack from http://employmentwagesblog.info/saurabh-pants-weblog-clickonce-and-firefox/

  • Anonymous
    April 20, 2008
    PingBack from http://stocks-options-trading.info/trading-strategy/?p=566

  • Anonymous
    November 09, 2008
    Sometime happens your ClickOnce installer doesn't works in Firefox. Look at the remedy tip and problem discussion on the Saurabh Pant's blog. I've met with this problem too, but I've solved it by proper MIME type settings.

  • Anonymous
    January 18, 2009
    PingBack from http://www.keyongtech.com/433745-visual-studio-2008-orcas-s

  • Anonymous
    May 29, 2009
    PingBack from http://paidsurveyshub.info/story.php?title=saurabh-pant-s-weblog-clickonce-and-firefox

  • Anonymous
    June 01, 2009
    PingBack from http://woodtvstand.info/story.php?id=6690

  • Anonymous
    June 19, 2009
    PingBack from http://mydebtconsolidator.info/story.php?id=968