Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. using (ServerManager serverManager = new ServerManager())
  2. {
  3. foreach (var site in serverManager.Sites)
  4. {
  5. var siteNode = new TreeViewItem() { Header = string.Format("Site: {0}", site.Name) };
  6. _irv.trvIisInformation.Items.Add(siteNode);
  7. foreach (var application in site.Applications)
  8. {
  9. var appPoolNode = new TreeViewItem() { Header = string.Format("AppPool: {0}, Type: {1}", application.ApplicationPoolName, HoleApplikationstyp(serverManager, application)) };
  10. siteNode.Items.Add(appPoolNode);
  11.  
  12. foreach (var virtDir in application.VirtualDirectories)
  13. {
  14. appPoolNode.Items.Add(new TreeViewItem() { Header = string.Format("Dir: {0} [{1}]", virtDir.Path, virtDir.PhysicalPath) });
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement