Does anybody know how to programmatically get the sites list and virtual dirs in IIS 7?
One important caveat to using the Microsoft.Web.Administration assembly is the code has to be running on a machine that has IIS7 installed.
When I was developing a system to load IIS7 sites into a webpage on my windows XP machine I discovered this limitation. The API is great, I just wished I could have used it.
Control IIS 7 server from Windows 2003 server programmatically