Mohammedz.com

For Linux and Shell scripting.

Active Server Pages error ‘ASP 0131’, Disallowed Parent Path

3 Comments


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 error 'ASP 0131'
Disallowed Parent Path
The Include file '../<filename.asp>' cannot contain '..' to indicate the parent directory.

Reason:
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:
<!--#include file="../<filename.ext>"-->


Solution:

The best solution to the problem is to use absolute virtual paths from the root of the Web site instead of relative paths.

An alternative is to enable parent paths; however, this is not the preferred method. This is accomplished for your default Web site by using the following steps:

Internet Information Services 6.0
1. Open the Internet Services Manager in the Microsoft Management Console (MMC).
2. Right-click on your Default Web Site and select Properties.
3. Click the Home Directory tab.
4. Click the Configuration button.
5. Click the App Options tab.
6. Click to select the Enable Parent Paths checkbox.
7. Click the OK button until you return to the MMC.

Internet Information Services 7.0
1. Start Internet Services Manager.
2. Click Default Web Site, and then click Properties.
3. Double-click ASP in the Features pane.
4. Expand Behavior.
5. Click Enable Parent Paths.
6. Click True for Enable Parent Paths.
7. Click Apply.

Advertisements

3 thoughts on “Active Server Pages error ‘ASP 0131’, Disallowed Parent Path

  1. Hi,

    thanks a lot for this article, it helped me out of very ugly situation.

  2. Day 42.) Solution for an annoying ASP Error

    Code: include file=”../hiddenDir/conn.asp”

    Error: The Include file ‘../hiddenDir/conn.asp’ cannot contain ‘..’ to indicate the parent directory.

    Solution: include virtual=”/hiddenDir/conn.asp”

    Enjoy 🙂

    – Reelix

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s