Thursday, April 1, 2010

IIS6 - The specified handle is invalid

I've met an issue on a development server whereby the IIS just simply refuses to start. I took a step-by-step diagnostic approach and went to "inetmgr", and all i see is just a IIS without a "+" sign.

When i right click on it and start, it just loads a progress bar and terminates. No error messages, no prompts, no nothing!

I remembered that IIS needs IIS Admin service to be running in order to start, so i checked "services.msc" and i saw the problem. IIS Admin service wasn't running even though it was set to be automatic. When i try to start the service, it gave me a very "helpful" error message

"Error 6: - The specified handle is invalid".

After scouring around the net, i manage to find a couple of solutions, tried all of them and IIS still wouldn't budge. I told the support team to reinstall IIS and we will reconfigure all the sites. Going home and waiting for the reinstallation to finish, i came back when they informed me and found out that the IIS gave me an even better error message now.

"System cannot find the path specified"
Very pissed off, i decided to dig deeply into the root of the problem. I found out from the rest of the team that someone had actually messed around with the server. He was trying to get a X.509 certificate going in the server, but somehow he messed up IIS configs.

After a couple more hours of troubleshooting, i found out that the error message literally implies the truth. IIS is unable to find a couple files that it has direct dependencies. One of which is MetaBase.xml and MBSchema.xml 


True enough, when i navigate to the directory ":\WINDOWS\system32\inetsrv" i saw MetaSchema.xml was there, but MetaBase.xml was missing. I also found out that IIS creates 10 versions of backups whenever there are changes to its configs. I took the latest and renamed it back to MetaBase.xml and everything was up and running again.

No comments:

Post a Comment