Print Page | Close Window

Relative path problems

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=28051
Printed Date: 02 April 2026 at 8:05am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Relative path problems
Posted By: Pilsener
Subject: Relative path problems
Date Posted: 20 November 2009 at 3:23pm
I'm trying to address a folder named "db", located 2 directories above the "database" folder in the forum folder. 
 
So why isn't this relative path working ?
 
strDbPathAndName = Server.MapPath("../../db/wwForum.mdb")
 
I get an error msg saying: "The '..' characters are not allowed in the Path parameter for the MapPath method."
 
This is exactly the same method as mentioned here: http://www.webwiz.net/webwizforums/kb/moving_access_database.asp" rel="nofollow - http://www.webwiz.net/webwizforums/kb/moving_access_database.asp



Replies:
Posted By: WebWiz-Bruce
Date Posted: 20 November 2009 at 3:26pm
This means that Parental Paths have been disabled in the IIS web server.

You need to either re-enable Parent Path on the webserver for your website or remove the MapPath method and use the physical path eg:-

strDbPathAndName = "c:\hostingspace\mywebsite.com\db\wwForum.mdb"

Check with your web host a to the correct path to use.

If you are using Windows Server 2008 then you don't need to worry about securing the database as by default Windows 2008 IIS7 doesn't allow you to download .mdb files (Access files) with a web browser.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net