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

DSN less connection file problems on ISP 1

Status
Not open for further replies.

dongledell

Technical User
Dec 10, 2002
26
GB
Hi, I'm having severe difficulties with my ISP - who are being as helpful as a chocolate tea-pot.

After much discussions all the ISP would say is "we got it to work by changing you code - your code is wrong" but they wont tell me what they changed - how helpful!

So - the setup.

In a folder called "asptest" on the server are 3 folders -1. "data" which contains the access database "data.mdb".
2. "connections" which contains an asp page "pcconn.asp" which is just a server.mappath function to create a DSN-less connection
3. "pages" which contains the asp page "test.asp"

On the page &quot;test.asp&quot; is a <!--include file: ... --> that points to the &quot;pcconn.asp&quot; to get the connection to the &quot;data.mdb&quot;, and then a simple request for some data from there to show it's working.

OK - this all works on my localhost as stated.

The ISP has told me that the problem is that they have parental pathing disabled for security reasons, so my connection in the &quot;pcconn.asp&quot; that had server.mappath(&quot;../data/data.mdb&quot;) and in the &quot;test.asp&quot; in the <!--include file:....&quot;../connections/pconn.asp&quot; wont work...

as I say, they have found a way around it but wont tell me!!

ANY IDEAS PLEEEAAAASSEEE I'm going mad!!!!!!!
 
Not exactly sure about &quot;parental pathing disabled&quot;. Do they allow you to use any folder under your ASP folder for your MDB database? If so, you may better do it this way.
 
hmmm - hadn't thought of that. might be worth a try in the morning!

by parental pathing they simply mean that you cannot use &quot;..&quot; - e.g ../data/data.mdb , you'd have to have &quot;asptest/data/data.mdb which is what they (the ISP) told me to do, only that does not work either.

What is REALLY getting my goat is that they &quot;claim&quot; to have got it to work in it's current format, and yet strangely will not show me the code they used.....
 
If they allow any subscriber to access database in any folder outside the subscriber's main folder, this could lead to subscribers hacking other subscribers' database. You should be happy to know you can trust them to protect privacy of their members like you.
 
Hello there,

I had a similar problem with that. Try this:

lConection.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; & Request.ServerVariables(&quot;APPL_PHYSICAL_PATH&quot;) & (&quot;data\yourdb.mdb&quot;)

This way you get directly to the root fonder of your site. No security risks at all I think.

(If not sure about ServerVariables, check this site:
Or just do a Response.Write(Request.ServerVariables(&quot;APPL_PHYSICAL_PATH&quot;)) to see what it returns.

Hope this helps.
 
thanks katixa - very helpful! given me a whole new area to explore!

medic - I am pleased that they are so security conscious, but feel it rediculous that they would not provide simple help to a customer. The code they claimed to have written to access the database would have been of no use to allow me access others databases, or there entire system ethic is pointless, however to prevent the site owner accessing the database....
 
ISP has ASP.NET suport as well?
If so, some configurations does not allow you to use &quot;.&quot;, &quot;..&quot; within your paths from normal ASP code. There for using Physical Paths will work.
As for ISP, they act same here.

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top