PDA

View Full Version : Server.MapPath


bmacdonald
03-09-2003, 09:43 AM
From the root folder of an application, I tried Server.MapPath to a folder above my application. I want more than one application to access the same database. I got the error "Cannot use a leading ../ to exit above the top directory." So can Server.MapPath only map a path within the same application?

bmacd

bruce
03-09-2003, 12:15 PM
I think this is a security measure to disallow server mappath to climb back up the directory tree.

You can use the physical path (found in the account information section in the control panel) instead of using map path.

Hope this helps


[b]quote:Originally posted by bmacdonald

From the root folder of an application, I tried Server.MapPath to a folder above my application. I want more than one application to access the same database. I got the error "Cannot use a leading ../ to exit above the top directory." So can Server.MapPath only map a path within the same application?

bmacd
</blockquote id="quote"></font id="quote">