Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

Building a generic Web Configuration Utility

On this page:

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.




The Voices of Reason


OdeToCode Link Blog
November 06, 2004

# OTC Links For November 6

Charlie Arehart
January 29, 2005

# re: Building a generic Web Configuration Utility

Rick, I'm really surprised there hasn't been a great outpouring joyful comments on this. It seems just a golden tool for solving the problems it's designed for. I know it's been a few months since this entry was posted so maybe not as many are going back and reading older entries. I'm catching up on your fantastic writing after being MIA for a couple of months.

I'll be spreading the word about your tool, as it seems a great solution for people I know who are building bundled .NET web apps.

Thanks so much for everything you do. So many great resources. I saw one post mentioning hopes for a .NET UG on Maui. Hope it happens. I'd welcome the chance to come say hello, as I'm planning a vacation there and would love to buy you a drink in thanks. Cheers.

Rick Strahl
January 29, 2005

# re: Building a generic Web Configuration Utility

Thanks Charlie. I use this thing all the time, so I know it's damn useful. Every piece of ASP.NET sample code I post usually has this with it now.

September 27, 2006

# re: Building a generic Web Configuration Utility

Hi Rick

This app looks really useful!. have been looking for something that does exactly this. although i would like to see more advanced control of IIS settings. If I purchase the source code verison does it include future releases??


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024