IntraWeb supports several deployment options. The product I’ve created in IntraWeb is used primarily by government agencies in the U.S. Those that choose to deploy on their own servers generally prefer IIS for a number of reasons. As anyone who’s installed on IIS can tell you, it can be a real challenge. That challenge is compounded when your client wants to install the software and set up IIS themselves. Originally, we documented the process step by step. (http://www.governmenttools.com/cm/CMFiles/help/html/installingcrashmagic.htm) But maintaining that doc and executing the steps consistently was unreliable. So I created an app to do the job. This article presents that application. Please note that I haven’t attempted to make this app reusable to handle different cases.
The end result of running the app is logged during the process. Here is a sample of that log: cmIISConfig log
Since this code is very specific to my app, it probably makes more sense to just copy snippets rather than trying to build the whole app.
The application is called cmIISConfig and is written in c#. The main components are:
- A dialog to prompt for things like user group and user names, IIS web site and application pool.
Note: The top section is used for installing instances of my application. This is is pretty much a file copy to pre-defined folders. I won’t describe any of these functions in the article, as they probably don’t apply to your situation.
- MainForm – The main form class. Unfortunately this app has grown organically as an inhouse utility and really needs to have much of the functionality pushed down from the form into some worker classes. So rather than keeping this class hidden on my system until it’s been refactored, I’m posting it today warts and all.
- PdActiveDirectory – a class providing the ability to create AD groups and users and to assign directory permissions.
- PdIISManager – a class providing the ability to create IIS application pools, sites, handlers and all the other settings needed to install an IW dll as an ISAPI application.
- cmConst – Constants that are mostly specific to my app, but may be useful when reading the other code.