Publishing Microsoft ClickOnce Setup / Deployment using Apache

Publishing a Microsoft ClickOnce Setup / Deploying ClickOnce using an Apache Webserver

Although it might seem as though you can only use Microsoft’s ClickOnce installers with IIS, this is simply not true, as all you need to do is set some mime types on the server.

The simplest way to do this is to add the following lines to a .htaccess file in the folder containing the ClickOnce files:

AddType application/x-ms-application application
AddType application/x-ms-manifest manifest
AddType application/octet-stream deploy

For some reason I also needed the following line in my .htaccess file

AddType application/x-msdownload dll

Once you’ve done this, your ClickOnce applications should install correctly. Since the release of Microsoft .NET Framework 3.5 SP1, ClickOnce applications work in both Internet Explorer and Mozilla Firefox. Earlier versions of the Framework will only run ClickOnce applications from Internet Explorer.

You may also want to add the correct mime types for XPS files, XAML files, XAML Browser Applications (XBAPs), and Silverlight 2.0 Applications. To add these, simply add the following lines:

AddType application/ xps
AddType application/xaml+xml xaml
AddType application/x-ms-xbap xbap
AddType application/x-silverlight-app xap

more information on AddType Directive

Important: Use FTP when publishing from Visual Studio, Unless you want to install FrontPage Server Extensions on your Apache!

Using a ClickOnce application with FireFox

Currently ClickOnce applications will only work with Internet Explorer, you use FireFox, but you will need to install the FFClickOnce extension.