1
Reply

Failed To Map the Path( / )

Rahul Saxena

Rahul Saxena

Feb 18 2008 4:30 AM
26.6k

If we use  Server.MapPath("..") in ASP.NET 2.0  Then It Gives a error

System.InvalidOperationException: "Failed to map the path '/'"

In ASP.Net 1.x, Server.MapPath("..") works fine in the older versions.
The newer version does not support ".." and it is recommended to use "~" instead. For e.g.:

Server.MapPath("~/Path");


Answers (1)