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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frustrating Map Path Issue

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
0
0
CA
Hey gang,

here's my directory:

-www
--app
---client
----database
---module
----popup

I need the popup to reference a database in the client>database directory, but I'm having some mappath woes. Apparantly ..\ gives an error (?! thought that was the way to navigate back up a directory?) but .\ doesn't...although .\ doens't bring me wehre I want to be (argh!)

Any thoughts on how i can do this?!

Thanks,

jack
 
I tried that, but I keep getting this error message saying that "the characters '..' are not allowable in mappath"

Or something to that effect.

Maybe I have the \ instead of /. I'll give it a try, and if it still errors out I'll post the right error message when I get back to work tommorrow.

Thanks for the reply!
:)

jack
 
I've seen that before but can't remember exactly what the issue was, something about navigating through virtual folders I think.

One solution would be to ask it to map the path for "/app/client/database"
This is a qualified web directory so it should be able to map it correctly. When the string starts with a slash the script assumes the path begins with the default web directory.

-Tarwn

[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Hey guys,

Just wanted to let you know what the problem was. We had someone doing some maintenance on our web server, and somehow the option to allows Parent Paths was unchecked.

Once it was selected the code worked again!
yay!

Thanks,

jack
 
Having parent paths enabled is generally recognized as a poor practice from an information security perspective, as is navigating to parent paths in your code as a programmer.

The reason is that if you happen to install a rogue script that decides to navigate to your root directory and delete all of your files, you would have no protection against it except to remove the script's ability to delete anything but itself by disallowing parent paths.

There is always an alternative to parent paths. Try #include file instead of #include virtual and if that isn't feasible, put the files in the same directory or change your directory structure.

Microsoft's Baseline Security Analyzer (MBSA, downloadable on TechNet) should be periodically run on any Microsoft-based server, and it will definitely tell you that there is a security weakness if you have parent paths enabled. Do a general Internet search for lots of information on this topic.

Len
 
Len, if you saw the application I was working on, you'd see that EVERYTHING about it was poor coding practice.
;)

Thanks for your post though. I've since left the company I was working for at the time I originally posted this thread, and its good to see that they really are as messed up as I thought they were. The way the original application was set up, there would have been no other way around it (it was a legacy app that we were trying to make do things it was never made to do). Sigh...meeeemoriiieess...

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top