View Full Version : Disallowed Parent Path in #include

01-26-2005, 10:22 PM
i just set up a "new web site" to point at a directory on my server (E:\inetpub\wwwroot\public\dir\)

this works fine on domain/public/dir

but on dir.domain it says
Active Server Pages error 'ASP 0131'

Disallowed Parent Path

/pages/home.asp, line 1

The Include file '../functions.asp' cannot contain '..' to indicate the parent directory.

i have a default page with server.execute("pages/home.asp"), and pages/home.asp loads functions with <!--#include file="../functions.asp" --> (functions is in the same dir as default but i cant use #include to load pages/home.asp because the "home" part is dynamic with quite a few pages so i dont want to have a huge switch case and error on 1 page = error on every page and stuff

01-27-2005, 04:20 AM
The error is being generated because the server configuration doesn't allow you to use relative paths when using includes. You can probably work around the problem using virtual includes instead of file includes.

01-27-2005, 09:29 AM
yea i guessed it was a permission, but where do i change it to allow relatives?

03-03-2005, 12:37 AM
You can change this setting by following these steps:

1. Go to your IIS Manger
2. Right click the default web site
3. Choose Properties >
4. Select Home Directory Tab
5. Click ‘Configuration’ button
6. Select Options Tab
7. Check the Enable Parent Paths
8. Click OK and your new configuration will be saved.

This will allow code to access paths with the '..' indicator.

10-04-2005, 11:26 PM
is there anything similar for linux...I'm doing my application in windows but the hosting company uses linux...(asp)