The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for December 18th, 2013

ASP.NET – Great explanation of Server.MapPath parameters “.”, “..”, “~”, @”\”, “/” and “/path”

Posted by jpluimers on 2013/12/18

Thanks StackOverflow user splattne (Stefan Platnner) for explaining the differences between the various parameters you can pass to Server.MapPath, and giving some very clear examples.

You can also use it with HostingEnvironment.MapPath, which has the added benefit that it doesn’t require HttpContext (for more detail on it, see Working With HttpContext.Current).

–jeroen

via:

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, ASP.NET, Development, Software Development | Leave a Comment »