I build a fair amount of small Web applications that get distributed out as samples, as part of articles or as part of products that we sell. ASP.NET’s XCOPY deployment is a great way to get these applications out – the user can just download and copy the files usually from a ZIP file.
But beyond that there are still the steps of creating a virtual directory, potentially setting up Directory rights so that the Anonymous user has access to the virtual and files within it. If you’re distributing a VS.NET solution as part of sample you may also need to fix the Solution’s Web Project path so it can find the Web project at the virtual directory that was created. Finally in some instances you want to also allow users to configure MSDE if your application uses SQL Server – configure the type of security used and potentially allow adding an account and Login.
I’ve done this sort of thing too many times myself and everytime I distribute a sample or distribution I usually create a one page text file that describes this process.
So, last week I sat down and wrote a generic utility that makes this process a bit easier and more importantly more professional. I created a Web Configuration Utility that performs the above tasks with a simple WinForms based interface. There are a few tab pages that handle Virtual Directory creation, Directory Right assignments, the VS Solution fixing and MSDE configuration. Here’s what the forms look like:

The form acts as a front end to the Configuration class, which manages all the interaction to perform the various tasks. The configuration information is saved in an XML file and this XML can also be used to run the configuration without the UI.
The idea is that you as the developer can ship this utility with your Web application. You run the utility once and configure the basic setup and exit which writes the XML file. You can then ship the app with the XML file and the user will see those same settings that he can then approve on his own. Or you can ship it as part of an install and call the operation in command line mode to ‘just do it’.
The Configuration file also contains a few options for determining which pages get displayed and the title, so there’s some limited customizability.
I’ve just backfitted a couple of samples from this site here with this utility and it sure reduces the amount of time it takes to get an app ready for distribution. And I suspect it will be a heck of a lot easier for users who can just configure their ASP.NET app in a minute and be ready to run.
This tool is ideal if you need to ship applications XCOPY style rather than shipping a whole software installation. Some of the full and expensive installer tools let you perform all these tasks as well, but this tool keeps things simple without the long process of creating an install. It only takes a minute to set the base settings and you add the EXE and the matching XML file to your XCOPY file list and off you go.
Check it out. It’s free to use and re-distribute.
For more info check out the Product Page, which includes full documentation.
Other Posts you might also like