Saturday, March 31, 2012

Subst Question

Anyone have insight as to why an ASP.NET app (1.1) would not recognize a substituted drive on the first page hit? I have done a subst e: c:\ for my local development (to mirror production), but every time that I hit the asp.net app (and force compilation maybe?) I get can't find portion of path e:\ error. (for logging components I have reference to e:\myfolder\logs in my web.config file.) If I hit my browser's back button and try again it works. Thanks in advance!

Not sure about your specific problem, but why not use Server.MapPath() to map relative paths to absolute? That way it will work on any server.
Sorry, I didn't have email enabled, so I'm just getting back to checking on this... Thanks for the comment. I'm not sure this applies, unless I'm not up-to-speed on Server.MapPath(). Isn't that just for relative path to physical path mappings? We use this regularly for web site content mapping. However, we have logging components that specify a non-web location on disk (the e: drive) for the log file location. The web site, itself, may be anywhere, just mapped with a virtual dir. Anyone else have any ideas on what's happening with ASP.NET?

0 comments:

Post a Comment