Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Disallowed Path Characters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Disallowed Path Characters

 Post Reply Post Reply Page  123>
Author
GrlGeek View Drop Down
Newbie
Newbie


Joined: 10 December 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote GrlGeek Quote  Post ReplyReply Direct Link To This Post Topic: Disallowed Path Characters
    Posted: 10 December 2007 at 6:04pm
I did a search in the knowledge base, and a search on the forums, but I didn't find the phrase 'Disallowed Path Characters'. I am moving a forum from a server where the admin used the physical path (c:\websites\etc) as the strDbPathAndName to point to the location of the forum database to a hosted server where I need to use the virtual path. The database is an Access database. In the WebWiz Guide, on the 'Securing Your Microsoft Access Database' page (http://www.webwiz.net/webwizforums/kb/moving_access_database.asp), step 4 indicates that I should use ../ to move up the directory tree. However, when I defined the virtual path in database_connection.asp and then attempted to access the forum, I got the error message below:

Server.MapPath() error 'ASP 0175 : 80004005'
Disallowed Path Characters
/forum/database/database_connection.asp, line 87
The '..' characters are not allowed in the Path parameter for the MapPath method.

If I can't use those characters, how do I reference the database outside the root of the website? Or do I have to put the database under the root directory on a hosted server?

Thanks.
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 6:22pm
I may be wrong, but do you need to "Enable parent paths" on the web server. If so, in IIS manager, right click the web site, select properties, click the "Home Directory" tab, click the "Configuration" button, then the "Options" tab and place a tick in the "Enable parent paths" check box.
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 6:38pm
Looks like this may be the cause, however, I note you are on a hosted environment, so you may not be able to make the change. The following blog http://www.bennadel.com/blog/153-The-Characters-Are-Not-Allowed-In-The-Path-Parameter-For-The-MapPath-Method.htm also indicates that the command Request.ServerVariables("APPL_PHYSICAL_PATH")  may be of use as it gives the physical path. 
Back to Top
GrlGeek View Drop Down
Newbie
Newbie


Joined: 10 December 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote GrlGeek Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 7:59pm
Thank you very much for your reply! The site is hosted, but it is a virtual dedicated server, so I have an email out to the admin to see if this is a change he can make. In the meantime I will try the Request.ServerVariables command, though if it returns the applications path it will still not be high enough in the tree, since the app is under the site root and the database is outside it.
Back to Top
jamie.townsend View Drop Down
Groupie
Groupie


Joined: 07 December 2007
Location: England
Status: Offline
Points: 114
Post Options Post Options   Thanks (0) Thanks(0)   Quote jamie.townsend Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 8:04pm
Allowing parent paths should fix this and allow you to use ../
The admin should have no problems at all doing this.
 
However, you really should consider upgrading to SQL as access is poo :D
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 8:28pm
I agree with Jamie. Smile If you can't use parent paths, you could put the access database in a folder with a random name (perhaps even chaning it's file extension - it should work), so the database become something like "7we!rty5\asd75$r.ahgrt" under your forum folder. The APPL_PHYSICAL_PATH will give you the full path to put in the connection string. It's security by obsecurity - not brilliant, but better than nothing. The web server may not even serve a "ahgrt" type file to a client, even if the type the full path into the browser.
Back to Top
GrlGeek View Drop Down
Newbie
Newbie


Joined: 10 December 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote GrlGeek Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 9:15pm
Ha, yes, Access=poo. If I had my druthers the site would be using SQL on Linux, but I'm just a contractor trying to reassemble the pieces my client has left after dissolving a relationship with the person who set the site up. So, if I change the file extension, the database will still work?
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2007 at 10:39pm
Can't guarantee it, but I can't see any reason why not. I have used DTS packages on SQL 2000 to read access databases with different extensions and as you have to specify the full path including the extension, it should do.
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.