Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Using Relative Paths With Mappath
kvarnerexpress
post Mar 2 2006, 08:55 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



I know this is an easy question (if you know the answer…) but I am at the “hair pulling out” stage with this.

Very simply, I have an Access database that I am accessing using ASP (ADO).

If I have the database in the normal htdocs folder and use mappath to tell ASP where it is and what it is called, then no problem. Works perfectly.

However, if I leave the database in that folder and someone “views source” to find out the name of the database, then they can easily download the database. Not good.

I have now put the database in the private folder (same level as htdocs. That is, /private and not /htdocs/private) so that the database cannot be downloaded (correct?).

Problem is I now cannot figure out how to write the mappath so that ASAP can find the database! This is despite searching here, codefixer, w3schools, google etc etc.

I know it’s easy to fix but I just can’t find the answer.

Thanks in advance.
Go to the top of the page
 
+Quote Post
magiccode9
post May 6 2006, 08:54 AM
Post #2


Premium Member
********

Group: Members
Posts: 162
Joined: 1-November 05
From: SATA II
Member No.: 13,683



Did you take a look at the IIS documentation ? if not, take a look of it, you will get more. smile.gif

ok, let's return. If I'am not forget it. You can use .. to return to previous directory.

let's say you have a site path with /htdocs and /private and currently in /htdocs
you have to specific Server.MapPath("../private/[something-to-specific]").

one more to note if your server is disabled "Parent Path". This rule will not be apply. smile.gif

Hope this help
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How Would You Treat A Relative That Has Slashed His/Her Wrist(19)
  2. Ie6 Relative Positioning Bug(1)
  3. Base Tag(2)
  4. Relative Motion Quiz(0)


 



- Lo-Fi Version Time is now: 26th July 2008 - 05:27 PM