Server.Map path returns error System.InvalidOperationException: Failed to map the path in Cassini

by Cliff 31. August 2008

I encountered an issue today while trying to use the Server.MapPath method in an asp.net web page.  When trying to use Server.MapPath with a virtual directory in IIS (outside the web site) I was receiving an System.InvalidOperationException: Failed to map the path error.  Turns out, since I was running the web site as a file system project, and using cassini, this error was being generated.  By moving the project to IIS and running the site under IIS and not cassini, the error went away.

Cliff Gray's Info

Cliff Gray
Developer/Founder GrayTechnology.com.

E-mail me Send mail

Authors

Calendar

<<  June 2018  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

View posts in large calendar

Blogroll

Download BlogEngine.NET

Download at CodePlex

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Subscribe