Under ASP.NET and IIS, if I have a virtual path in the form "~/content", I can resolve this to a physical location using the MapPath method:
HttpContext.Server.MapPath("~/content");
How can you resolve a virtual paths to a physical location under an OWIN host?
You may use AppDomain.CurrentDomain.SetupInformation.ApplicationBase to get root of your application. With the root path, you can implement "MapPath" for Owin.
I do not know another way yet. (The ApplicationBase
property is also used by Microsoft.Owin.FileSystems.PhysicalFileSystem.)