I want to find the physical path within an IIS website, of a path relative to the root of the website, using Microsoft.Web.Administration .NET assembly.
There doesn't seem to a single method to do this, but I am wondering - is the following procedure the best way?:
Lee
I found the following code to get the path
ServerManager sm = new ServerManager();
sm.Sites["Default Web Site"].Applications["/"].VirtualDirectories["/"].PhysicalPath;
http://forums.iis.net/t/1146686.aspx/1
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