DirectoryEntry w3svc = new DirectoryEntry("IIS://LocalHost/W3SVC/1/ROOT"); foreach (DirectoryEntry site in w3svc.Children) { if (site.Name == "MyVirtualDir") { foreach (PropertyValueCollection property in site.Properties) { Console.WriteLine(string.Format("{0}[{1}]", property.PropertyName, property.Value)); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)