簡體   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