Remove zombie websites from your IIS server
Zombie websites get created whenever the root application of a website is removed, orphaning the rest of the application content in your website.
Because IIS requires the root of the website to be an application, this effectively renders the website inaccessible:
- It cannot serve requests
- It does not show up in InetMgr
- It will likely break many administrative or configuration actions
(Note: if you remove a parent application that is NOT the root of the site, things will still work fine - even though the child apps may be considered orphaned, they are actually not. The only change that happens is that content at the parent application's level becomes part of the root application)
There is a good article describing how to find these here: Hunting zombies: how to remove orphaned IIS web applications. However, the article does not actually tell you how to remove them, and since you cannot easily remove them from InetMgr, many users seem to be out of luck.
After trying to help a user on the IIS forums here to remove a zombie app, I decided to write a quick tool to do it.
So, here you go:
Download the tool: http://mvolo.com/wp-content/uploads/2012/11/RemoveOrphanedSites.zip.
To run it:
> RemoveOrphanedSites.exe /site:all <-- Shows all orphaned sites ONLY, does not remove
> RemoveOrphanedSites.exe /site:all /remove <-- Removes all orphaned sites
> RemoveOrphanedSites.exe "/site:Default Web Site" <-- Checks if the specific site is orphaned
> RemoveOrphanedSites.exe <-- Displays help, how to connect to remote servers, etc
Hope this helps everyone who has this problem.
Best,
Mike

