Results 1 to 8 of 8

Thread: Server Side Includes

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Dear all,
    I have an include in my asp page as shown below.
    <!-- #INCLUDE FILE="../Includes/Test.asp" -->
    When I run the asp I get an error message
    The Include file '../Includes/Test.asp' cannot contain '..' to indicate the parent directory.
    Is it necessary that the include files be in the same directory as the asp page in which they are included?


  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    Springfield, IL
    Posts
    124
    Try using the virtual parameter for the include.


    <!-- #INCLUDE VIRTUAL="/Includes/Test.asp" -->

  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I believe the ability to use "../" notation would present a security risk, as it could possibly allow access to "secure" OS files, etc.

    Josh

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    You have to enable "Allow Parent Paths" in the Web App configuration thru the IIS manager

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Dear Clunietp,
    Where do i set this setting in the web server. I mean where is IIS manager is it same as Administration site.

  6. #6
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Go to the properties of your root app

    Click on the home directory tab, click the configuration button

    click on the app options tab, check "Enable Parent Paths"

    This is what I have in Windows 2000, should be similar for IIS 4

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Dear Clunietp,
    "Enable Parent Paths" is enabled on my web server yet I am getting the error. Any other suggestions.

  8. #8
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Hmmm...that's all I can find on this one -- make sure you enable parent paths for the application, and if that doesn't work, try to enable them for the web site and finally the master web properties....

Posting Permissions

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



Click Here to Expand Forum to Full Width