As much as I try not to, I still end up with all kinds of sample web applications and test stuff installed on my local machine. I can't ever remember everything that I've installed and it always seems like I'm looking for something that I know I have installed there.
I need some kind of menu to show up when I go to http://localhost that displays everything there. I thought about simply turning on Directory Browsing, but it only displays the actual directories, it does not display any virtual directories. Most of the time virtual directories are what I am looking for - stuff that was installed when I installed a component, or sample application, etc. The only way to find that stuff is to open up IIS, and I don't like doing that every time I think I need to hunt something down..
I decided today that I wanted to create a new “home” page for my localhost web site to replace localstart.asp that would give me a listing of all the directories and virtual directories that are there with links to them. I figured that all I would have to do is find the right methods and properties for the ADSI interface for IIS and I was right. I ended up basing my page on a copy of the existing localhost.asp page - mostly because it had a pretty good look and I am lazy.
Additionally, many times I need to know the actual file path of the files in the virtual directory. I added a span that displays the path when you mouse over the link.
So click here to get the code: ( no longer available ). To setup the page create a new default.asp page in the wwwroot folder. Paste the code into that file. Go into IIS and change just that default.asp page so that it is running under an account with administrator permissions (or turn anonymous access off). That is all there is to it.