Vivek Thakur

Chaotically Complex

  Home  |   Contact  |   Syndication    |   Login
  105 Posts | 1 Stories | 497 Comments | 65 Trackbacks

News



Archives

ASP.NET Ventures

Using Server.MapPath("..") in ASP.NET 2.0 will result in the below error:

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

This might come as a surprise to ASP.Net 1.x programmers as 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("~/Folder1");

posted on Sunday, January 21, 2007 2:34 PM

Feedback

# re: Failed to map the path '/' 9/5/2007 4:59 PM Bahar
Thank you for the explanation.It was too useful for me.

# re: Failed to map the path '/' 12/13/2008 6:37 AM Dinesh
I am using Server.MapPath("~/Folder1"); but still its giving same error. Failed to map the path '/'

# re: Failed to map the path '/' 2/1/2009 12:42 AM Dixie Ann
I am having some problems with this


# re: Failed to map the path '/' 3/25/2009 11:53 PM tejas v bhalani
it is very helpful service provide to all

# re: Failed to map the path '/' 4/3/2009 8:22 PM Raj Gohil
How about if I have network path //101.101.101/Abc ?

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: