繁体   English   中英

IIS-列出子站点及其所在的应用程序池?

[英]IIS - list subwebs and the app pools they are in?

我有一个带有很多子站点和几个应用程序池的IIS 6.0网站。

我想要帮助建立使用c#的每个子站点所在的应用程序池。

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

任何帮助表示赞赏。

谢谢。

窥见这个问题,我意识到这是针对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;
            }
        }
    }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM