?
Solved

The '..' characters are not allowed in the Path parameter for the MapPath method

Posted on 2003-03-06
5
Medium Priority
?
2,185 Views
Last Modified: 2012-06-21
The '..' characters are not allowed in the Path parameter for the MapPath method


objConn.Open "DBQ=" & Server.Mappath("../db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"


I get that error.. I run my own server so if somebody can say how i can solve that problem (is this an server option?)

thx
0
Comment
Question by:terie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Expert Comment

by:mberumen
ID: 8081896
Check out this page,

http://www.montreat.edu/docs/aspdocs/ref/obj/introbj_36.htm
MapPath
The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.

Syntax
Server.MapPath( path )

Parameters
path

Specifies the relative or virtual path to map to a physical directory. If path starts with either a forward or backward slash, either (/) or (\), the MapPath method returns a path as if path is a full virtual path. If path doesn’t start with a slash, the MapPath method returns a path relative to the directory of the .asp file being processed.

Note The path parameter can contain relative paths (../../Scripts/, for example) if the EnableParentPath registry setting is set to TRUE. This is the default setting.

0
 

Author Comment

by:terie
ID: 8082582
Note The path parameter can contain relative paths (../../Scripts/, for example) if the EnableParentPath registry setting is set to TRUE. This is the default setting.



where can i find that registry setting? I searched in the register but didn't find anything..
0
 
LVL 4

Accepted Solution

by:
mberumen earned 100 total points
ID: 8083135
That posting probably refers to an older version of IIS,  To change this seeting do the following

Open Internet Services Manager.

Select the node that represents your application or virtual directory,  

right click and select properties

On the first tab look under Application Settings, and click the "Configuration..." Button

On the dialog box that pops up  Go to the "App Options" tab
There is a checkbox labeled "Enable Parent Paths"

Hope this helps




0
 
LVL 4

Expert Comment

by:Wakie
ID: 8085351
Hi terie, you may like to connect to your database via a virtual path like this:

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\db.mdb"

Regards,
Wakie.
0
 
LVL 28

Expert Comment

by:sybe
ID: 8086638
use this:
Server.Mappath("/") & "../db.mdb;

so:

objConn.Open "DBQ=" & Server.Mappath("/") & "../db.mdb;Driver={Microsoft Access Driver (*.mdb)};"
0

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question