Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts

    Disallowed Parent Path in #include

    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

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    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.
    OracleGuy

  • #3
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    yea i guessed it was a permission, but where do i change it to allow relatives?

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    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.

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disallowed Parent Path in #include

    is there anything similar for linux...I'm doing my application in windows but the hosting company uses linux...(asp)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •