tags:

views:

485

answers:

1

I am trying to first list all the IIS websites and the folders/virtual web directories in each (in a tree view). Then after that I would like to allow the user to select any of the above nodes and create a new virtual web directory there. I can create a virtual web directory if I know the path I plan to use but I cannot get a list of the folders/virtual web directories in a website (I can get the website list).

+2  A: 

Use System.DirectoryServices to get the web sites from the IIS. You can find similar discussion at the following URL

http://channel9.msdn.com/forums/TechOff/78084-Extracting-list-of-web-sites-from-IIS-manager/

schar
I can get the list of websites. Thanks though.
Greg