【问题标题】:IIS - list subwebs and the app pools they are in?IIS - 列出子网站和它们所在的应用程序池?
【发布时间】:2012-07-08 03:20:01
【问题描述】:

我有一个 IIS 6.0 网站,其中包含很多子网站和多个应用程序池。

我想要帮助确定每个子网站在使用 c# 的应用程序池。

我查看了DirectoryServices 命名空间,但仍不确定该怎么做。

感谢任何帮助。

谢谢。

【问题讨论】:

    标签: c# iis-6 application-pool


    【解决方案1】:

    看看this question 我知道这是针对 IIS7 但可能值得一试

    ServerManager manager = new ServerManager();
        foreach (Site site in manager.Sites)
        {
            foreach (Application app in site.Applications)
            {
    
                if (app.ApplicationPoolName.ToString() == AppPoolName)
                {
                     string appname = app.Path;
                }
            }
        }
    

    【讨论】:

      猜你喜欢
      • 2015-07-09
      • 1970-01-01
      • 2018-11-04
      • 2021-10-14
      • 2012-12-23
      • 1970-01-01
      • 2013-01-01
      • 2017-08-19
      • 2014-11-14
      相关资源
      最近更新 更多