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

Discussion in 'ASP .Net' started by awbacker@gmail.com, May 12, 2005.

  1. Guest

    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
    , May 12, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon
    Replies:
    5
    Views:
    11,147
    Scott M.
    Jan 17, 2010
  2. Maciej Sobczak
    Replies:
    9
    Views:
    544
    Roger Binns
    Apr 25, 2004
  3. =?Utf-8?B?dHBhcmtzNjk=?=

    server.mappath vs. request.mappath

    =?Utf-8?B?dHBhcmtzNjk=?=, Mar 10, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    1,145
    Juan T. Llibre
    Mar 11, 2007
  4. Replies:
    4
    Views:
    963
    Juan T. Llibre
    Oct 7, 2007
  5. AAaron123
    Replies:
    11
    Views:
    1,199
    AAaron123
    Sep 9, 2009
Loading...

Share This Page