Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interrogating IIS 6.0

Status
Not open for further replies.

GabeC

Programmer
Apr 17, 2001
245
0
0
US
I am working with IIS 6.0 on Windows 2003.

Using c#, how can I get a list of web sites on the server and additional information such as:
IP address
Port
host header



Thanks,

Gabe
 
Use DirectoryEntry to get the website metabase from IIS. A lot of samples over the internet, just search "DirectoryEntry IIS".

Using the path "IIS://servername/W3SVC/", you should be able to iterate over the published websites/folders via the DirectoryEntry.Children property.

Hope this helps [wink]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top