Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
My Experiences Setting Up ClickOnce

For 6 months now I've been waiting for the opportunity to start deploying some of our internal applications via ClickOnce.

For those who don't know, ClickOnce is a new feature added to the 2.0 framework and VS2005. If you publish your application via clickonce, then you only need to provide a URL to your users - they goto that url, click the install button, and the application gets installed. From that point on, if you publish a newer version of your application, your users, the application automatically updates itself.

So here's what I've learned when trying to deploy a ClickOnce application to a server when I can't select the 'Publish' option in Visual Studio to publish directly to that server.

  1. Set up a virtual directory on the remote server.
  2. Give it anonymous access (I'd like to know if it can be limited to NTLM, but I haven't tested it yet).
  3. Don't bother to install the 2.0 .net framework. I did and it made no difference :)
  4. Don't bother to register ASP.net 2.0. I did (using aspnet_regiis.exe) and it made no difference :)
  5. For the virtual directory, go into the properties, select the HTTP Headers tab, click the File Types button, and register a new type. Put '.application' as the associated extension, and 'application/x-ms-application' as the Content Type. This one, as I discovered last, is the key.
  6. For niceness, add 'publish.htm' as a default document for your virtual directory.

Having done this, I told my test app to deploy to localhost. The files deployed just need to be copied to the remote server. So once I'd done this, I navigated to http://mydeploymentserver/ClickOnce/TestApp (where ClickOnce was the virtual directory I created, and TestApp was the sub folder I told it to make), and up came the install page.

If step 5 from above is missed, when you then click the install button all you get is a heap of XML streamed to the browser. By registering the mime type, ClickOnce kicks in when you click the install button, and it all works like magic.

Posted: Thursday, April 27, 2006 10:21 PM by Geoff Appleby
Filed under: ,

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Geoff's mother on a booger hunt
  • Geoff's hand
  • Teenage Mutant Ninja Geoffy!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS