Deleting web sites in the IIS on XP
March 6, 2007
I recently installed EPiServer on my XP computer, which is cumbersome to say the least. For example, when you choose an existing SQL account instead of creating a new one, the installer tells you that “the account already exists” and throws an exception. Duh!
Well, due to many attempts at installing EPiServer, my IIS was crowded with duplicate EPi sites… and I couldn’t find an easy way of deleting them. EDIT: I tried deleting them in EPiServer Manager, but for some reason that didn’t work.
The answer is two things:
1. Download the Microsoft Metabase Editor, and install it. Open up and go to the W3SVC in the LM branch. There you see different numbers for each of your sites. Remember what numbers correspond to the site you want to remove (the name is usually visible in the ServerComment key).
2. Open up the good old cmd.exe, change directory to C:\inetpub\AdminScripts (or wherever your inetpub is) and type the following:
C:\inetpub\AdminScripts>adsutil.vb delete W3SVC/X
where X is the number for the site that you noted from the metabase.
Done and done!
March 13, 2007 at 16:17
Or, in EPiServer Manager, right click the site, select Delete. You can choose to delete the IIS Site, the Database and/or all files in the directory.
March 13, 2007 at 16:25
Steve: Yes, that would be a lot easier. I forgot to mention however that that option wasn’t available for me at the time of writing, the “delete” menu command was greyed out for some reason. Dunno why…
November 22, 2007 at 12:25
Ah, thank you! Now I don’t have to reinstall IIS. Also I have a question; I couldn’t get my EPIServer running because I got an error saying that IIS didn’t allow access to metabase data or something like that. It’s been a while since I tried so I don’t remember exactly. Any thoughts about this?
November 22, 2007 at 12:29
I’m sorry Henric, but I’ve never seen that error. I’d use google and google groups searching for that exact error message, that’s all I can think of now.