Is there a way to get the physical filepath from an ASP.NET\'s URL?
Scenerio: I have an app that is on two severs, but it will now be on lots more, and each server p
This is now:
HostingEnvironment.MapPath("/");
You can use HttpServerUtility.MapPath on the server side in order to get the physical path of a file, then return it in the Application
or Session
object, similarly to what you are doing now.
As for the physical path of a URL - there might not be one, as URLs can be re-written.
This Server.MapPath ( "/" );
or this HttpContext.Current.Server.MapPath ( "/" );
should give you what you need.