public List <IISEntry> GetAppPoolList() { List <IISEntry> wsList = new List <IISEntry>(); IISEntry entry = null; System.DirectoryServices.DirectoryEntry iisRoot = GetAppPoolDirectoryEntry(); foreach (System.DirectoryServices.DirectoryEntry e in iisRoot.Children) { entry = new IISEntry(e.Name, e.Name); wsList.Add(entry); } return(wsList); }
public List <IISEntry> VirtualDirList(string siteID) { List <IISEntry> wsList = new List <IISEntry>(); IISEntry entry = null; System.DirectoryServices.DirectoryEntry iisRoot = GetWebSiteDirectoryEntry(siteID); foreach (System.DirectoryServices.DirectoryEntry e in iisRoot.Children) { if (e.SchemaClassName.ToUpper() == "IISWEBVIRTUALDIR") { entry = new IISEntry(e.Name, e.Name); // entry.AppPoolID = e.Properties("AppPoolId")(0).ToString wsList.Add(entry); } } return(wsList); }