Click Once is not just for IIS

by Martin Thwaites 10. June 2012 21:58

A while back I developed an application that has started to be used by my current company (it's called the "Network Beverage Selector", but I'm sure I'll blog about that at some point).  So they came up with some suggestions on enhancements, being the kind, generous guy I am, I did them.

I thought about how to deploy the application to them and then remember that I should be able to use Click Once.  The issue is that I don't own or have access to any IIS servers.  I googled for a bit, and then started playing.  It seems it's very easy to do actually.

 

All you need to do is add some Mime types to your config and it "just works".  I'm not usually one to say this, but it seems Microsoft have done something right!

 

So now I can publish via FTP to the site, and then the users can install directly from there.  Unfortunately, it does require that the user uses IE (*shudder*) or download an addon for Firefox, but as it's currently a windows only application, I'm not too bothered about that.

 

So add the following Mime-types and it should work:

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

I did have trouble working out where to put them, as the article I was looking at suggested .htaccess files, and I'm never keen on them (don't know why though).  I wanted to put them in the VirtualHost section as I used name based vhosts, but it didn't work.  I finally put them inside a location directive in there that covers all the deployment files and it worked.

Thanks to the following article for helping me with this:

http://robindotnet.wordpress.com/2010/06/12/mime-types-for-clickonce-deployment/

 

Hope this helps someone.

Tags:

.NET 4.0 | Apache

Widget Blogroll not found.

The file '/widgets/Blogroll/widget.ascx' does not exist.X

RecentPosts