CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Active Server Pages error 'ASP 0131' Disallowed Parent Path

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    51
  • Date Created
    Tuesday, November 23, 2010
  • Last Updated
    Tuesday, November 23, 2010
  • This Article Has been Viewed
    2598 times
  • Short Desc
    When you are adding in an INCLUDE from a sub-folder to a file in a parent folder you may get this error if the server is not properly configured.
  • Details
    When you using an INCLUDE FILE from within a Sub-Folder that is looking at a file that is located within the parent folder, you may get this error if the IIS server is not properly configured to allow parent paths to be used within your pages.

     
    Active Server Pages error 'ASP 0131'
    Disallowed Parent Path
    /includes/asp_functions.asp, line 49
    The Include file '../adocon.asp' cannot contain '..' to indicate the parent directory.
  • Recreate Issue
    Lets say that you have the following scenerio.

    G:\InetPub\wwwroot\mysite\sub-folder1\myfile.asp
    With an INCLUDE FILE for:
    <!--#include file="../file.asp"-->
    And that file is located here:
    G:\InetPub\wwwroot\mysite\file.asp

    Now, if the server is not setup to allow for parent paths to be used, you will receive the error.
  • Resolve Issue
    To correct this issue, you will need to edit your IIS configuration.
    The following instructions are for IIS6 and IIS7
    This should not be an issue with previous versions of IIS such as IIS4, IIS5 and IIS5.1

    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.

    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.