Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with virtual directories

Status
Not open for further replies.

RoKKos

Programmer
Feb 3, 2003
50
SE
Hi

Think I have a problem with firewalls and virtual directories.

I have a asp page on a webserver, on that server the sysop has created a virtual directory to were the databas is and it only lest thing trow on port 80. Do asp call db:s on port 80???

The path I´m using to call the vir.dir. is [server.mappath("./db/menu.mdb")].
Should I use somteting like [Request.ServerVariables("PATH_INFO")] instead??
 
what would that . in there be trying to accomplish?

if the db is local to the directory then you server.mappath it only onthe name of the db and exclude parent directories. if the db is in the parent then simply use the parent/name.mdb in the value of the mappath

eg:
parent location
server.mappath("db/menu.mdb")

direct
server.mappath("menu.mdb")

also notice I took the / out of the picture. in most cases if the database is located in the parent directory "db" in your case and you have the / in fron of the parameter you will indeed end up with
C:\
debug the function by writing the value and ending the response
eg:
response.write server.mappath("db/menu.mdb")
response.end

then validate if the path shown on the screen is valid




___________________________________________________________________

The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top