How I can get physical path of site on a disk ?
using (ServerManager serverManager = new ServerManager()) {
var sites = serverManager.Sites;
foreach (Site site in sites) {
Console.WriteLine(site.Name); // This will return the WebSite name
//but how i get it's path on disc ??????
}
ServerManager m = new ServerManager();
m.Sites["default web site"].Applications["/"].VirtualDirectories["/"].PhysicalPath;
basically every site has a "root application" which must have a "root virtual directory".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With