I’ve been experimenting with the Microsoft ClickOnce technology that is part of .NET 2.0. Its intended use is as a deployment option for a new package called MacroView Windows Desktop that is being developed. For large MacroView installations, the use of ClickOnce technology would save an IT department work by having a central point where the software package is updated and made available to all users automatically. The Visual Studio 2005 Build-Publish functionality was fairly easy to use in the first have-a-go experience. The first problem encountered was setting up the Linux apache server I’m using to know about the mime types used by click once. The httpd.conf file was modified to include the following lines:
AddType application/x-ms-application .application
AddType application/x-ms-application .manifest
AddType application/x-msdownload .dll
This got me to the stage where an installation web page (generated by VS2005) provided a launch point for clickonce installation:
The next problem was that clicking the install button just brang up the .application file’s XML contents and didn’t start an install process. I scoured the web attempting to find a solution but didn’t find anything specific. There were a number of mentions of the problem but no solution that worked in my scenario. The test environment was an Windows XP Home system running in a VMware virtual machine. As a test another Windows XP Pro virtual machine was used and that worked fine. This is a bit disconcerting as both were patched up with the current windows update patches and very similar other than the home versus pro difference. As a hunch, the Internet Explorer cache was cleared on the XP home machine. After this the Click Once launch proceeded as expected. All I can conclude at this stage is that before the server side had been set up correctly, one of the launch tests caused files to be cached which then affect subsequent launch attempts. Note that this was even with browser page refreshes, browser restarts etc. So if you ever have trouble getting a ClickOnce app to launch on Internet Explorer trying clearing the local cache as one of solution options.
Once a launch started, it downloaded the click once application files and initiated the install process. The security warning comes up since no publisher certificates have been set up for these experiments. It will be needed for a final MacroView Desktop package.
After that, the application just started up. The MacroView Windows Desktop is basically a graphical shell where .NET based application modules can be plugged in for site specific applications. The standard application modules that will come with the product will include a VNC viewer, report viewer, data grid viewer and embedded web browser. All modules can communicate via a basic messaging system and all modules have accessed to a managed set of connections to MacroView servers. More on all that once the product is finished though! This post is primarily about my initial experiences with ClickOnce.
One aspect of ClickOnce that I loved was that it was run as a limited user on XP, but the Add-Remove programs list was actually updated just for that user. The support info shows the application details and the web server that the files were obtained from. Clickonce apps are installed on a per-user basis and management of those apps is handled by the individual users seemingly without the need for admin access. Now getting it all running in a development environment is fine and dandy but I get the feeling that putting it in practice in the field will be a completely different kettle of fish. But thats something for another post.