-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Summary
Support HostingEnvironment.MapPath in SystemWebAdapters.
Motivation and goals
- This was (I believe) intended to be added as part of Ask About System.Web.Hosting.HostingEnvironment #368, but was omitted for some reason, perhaps unintentionally.
- It builds on Implement MapPath and AppDomainAppPath #184, which added
HttpServerUtility.MapPath - In the ReferenceSource
HttpServerUtility.MapPath(and all other similar methods, e.g.,HttpRequest.MapPathandVirtualPath.MapPath) all actually useHostingEnvironment.MapPath/HostingEnvironment.MapPathInternalinternally.- See HttpServerUtility.cs -> HttpRequest.cs -> VirtualPath.cs
- For that reason, it has long been popular "wisdom" to prefer HostingEnvironment.MapPath, see e.g., here.
Examples
HostingEnvironment.MapPath("~/foo");
HostingEnvironment.MapPath("/foo");
benamada
Metadata
Metadata
Assignees
Labels
No labels