ServerManager How to get site's physical path on disk?

后端 未结 3 1741
别跟我提以往
别跟我提以往 2021-01-04 19:10

How I can get physical path of site on a disk ?

using (ServerManager serverManager = new ServerManager()) { 

var sites = serverManager.Sites; 
foreach (Site         


        
3条回答
  •  再見小時候
    2021-01-04 20:00

    Use the following code to get path

    using (ServerManager serverManager = new ServerManager()) 
    { 
    
        var sites = serverManager.Sites; 
        foreach (Site site in sites) 
        { 
    
            foreach (Application app in site.Applications)
            {
                Console.WriteLine("path: {0}", app.Path);
            }
        }
    }
    

提交回复
热议问题