Get the path of the ASP.NET web application that is currently running

Get the path of the ASP.NET web application that is currently running

You can easily retrieve the path to the running ASP.NET application, using Request.PhysicalApplicationPath:

string AppPath = Request.PhysicalApplicationPath;

If the web application is located in C:\Inetpub\wwwroot\WebApplication1, the string AppPath will contain C:\Inetpub\wwwroot\WebApplication1

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top