I am trying to keep the physical root and relative root of my application in memory when the application starts.
I made the physical path as follows:
Global.ApplicationPhysicalPath = Request.PhysicalApplicationPath;
But I can’t get the relative path. I have the following code that works, but it requires it to be placed in an object page:
Global.ApplicationRelativePath = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "") + Page.ResolveUrl("~/");
thank
source
share