Server.MapPath() croaking with "failed to map path", but path is legal

A

awbacker

Havin a problem with MapPath() failing on me. It doesn't do it right
away, but at some point it dies and won't come back. I have to hiccup
the app by poking IIS or a web.config/other critical file.

First, some background :
0. .Net 1.1, Win2k, IIS5 w/ UrlScan (etc). Basic barebones win2k
webserver.

1. This just started happening recently. This area of the code has not
changed a bit since the last update, and has been functioning fine.

2. The directory that is being mapped does exist. Prior to the error
it maps fine and the page works. Other areas of the application appear
to be able to get at the files under this directory (since they rely on
it) just fine after the error, though I do not think that they need to
call map path since they use them in a web context (ie.
images/resources, etc)

3. The actual path that is being mapped is longer
(/ModuleContent/Sub/Sub2), but it also exists. The exception I get
references only the first component.

Here is the exception, with the fat cut out :

message -- Failed to map the path '/ModuleContent'.
source --- System.Web
stack trace ----------------------
at ...ISAPIWorkerRequest.MapPathSlowUsingIISCore(String path)
at System.Web.Hosting.ISAPIWorkerRequest.MapPath(String path)
at System.Web.HttpRequest.MapPath( [param name/types removed] )
at System.Web.HttpServerUtility.MapPath(String path)
at OurNamespace.HelperClass.GetAvailableStuff()
at OurNamespace.Class.Page_Load(Object sender, EventArgs e)

Thanks for any ideas! I have searched far and wide, but I can not find
any reports that are not years old or more than tangentially related.

Andrew Backer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top