Reinstalling IIS on Windows XP SP2
This evening I decided to suck it up and fix an ongoing problem with IIS. Basically some of the controls were not working correctly, the menu control and Infragistics controls mostly. It has been this way for about 2 months, but I have just lived with it because I am so busy with projects lately. But today I decied to fix this issue because I know there is something wrong at the core and as it turns out it is pretty easy to fix by removing IIS and re-installing it.
First go to the 'Add/Remove Programs' in control panel. From here choose the option on the left to Add/Remove Windows Components. You will then see a dialog with a list on component options for your system. Uncheck the IIS option and click next. It will remove IIS and ask to restart to apply the changes. So far so good.
Once your machine reboots follow the same path, but this time check the IIS option and click next. Here is where I hit my first problem, I quickly got the following message:
"Setup cannot copy the file staxmem.dll"
Turns out there was something wrong with SecEdit.sdb file, which is some sort of system Global Policy security file on the system. Most likely this is where my issue was to begin with. It was pretty easy to resolve. I found a Microsoft fix for the IIS install problem and followed the instructions. I ran the first thing on solution 1 and it solved the problem. I actually tried to follow solution 2 because the diagnosis sent me there, but it did not help me.
Basically esentutl /p Drive:\WinDir\security\database\secedit.sdb repairs the Global Policy database file. I then tried to procede with the IIS install and voila it worked.
So next I needed to make sure my web projects would work so I went into the IIS manager and set some of my project folders to be Virtual Directories. I then tried the first one and got an error, which I had anticipated. First I had to set the default web page to be 'default.aspx', then try the web site.
The error "Failed to access IIS metabase" came up on the page. I thought this was because I had not registered ASP.NET 2.0 with the web server and I was correct. You will need to execute the following at teh command prompt (note C is my default drive):
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
Then run your site and you should be up and running.