When you use relative paths in include statements with
Microsoft Active Server Pages (ASP), browsing a Web page may return an error
message similar to the following:
Active Server Pages,
Disallowed Parent Path
The Include file '../<filename.ext>' cannot contain
'..' to indicate the parent directory.
/<path>/<filename.ext>, line <number>
This is caused by disabling ASP's "parent paths" for a Web
site or application while using relative parent paths in an include statement.
Relative parent paths in include statements use the following form:
The best solution to the problem is to use absolute virtual
paths from the root of the Web site instead of relative paths.
example, if you use an include file named "mycode.inc" at the root of your
server, the virtual path would be "/mycode.inc." If you use the same include
file in a virtual directory named "/includes" on your server, the virtual path
would be "/includes/mycode.inc."
The syntax example below illustrates
how to implement virtual paths:
<!--#include virtual="/<virtual path>/<filename.ext>"-->
An alternative to using absolute virtual paths is to enable
parent paths; however, this is not the preferred method. (See the notes in the More Information
section for details.) This is accomplished for your default Web
site by using the following steps:
Internet Information Services 7.0
- Start Internet Services Manager.
- Click Default Web Site, and then click Properties.
- Double-click ASP in the Features pane.
- Expand Behavior.
- Click Enable Parent Paths.
- Click True for Enable Parent Paths.
- Click Apply.
Internet Information Services 6.0
- Open the Internet Services Manager in the Microsoft Management Console (MMC).
- Right-click on your Default Web Site and select Properties.
- Click the Home Directory tab.
- Click the Configuration button.
- Click the App Options tab.
- Click to select the Enable Parent Paths checkbox.
- Click the OK button until you return to the MMC.
There are additional security considerations to be considered
when enabling parent paths on an IIS computer.
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
AspEnableParentPaths MetaBase property should be set to False
Enable Parent Paths is disabled by default in IIS 6.0
For more information about troubleshooting this
and other ASP errors that may occur with IIS 6.0, visit the following Microsoft