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

<<  August 2018  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

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