PDA

Click to See Complete Forum and Search --> : Server Side Includes


msdnexpert
Feb 1st, 2001, 06:54 AM
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?

bsmith
Feb 1st, 2001, 07:47 AM
Try using the virtual parameter for the include.


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

JoshT
Feb 1st, 2001, 09:33 AM
I believe the ability to use "../" notation would present a security risk, as it could possibly allow access to "secure" OS files, etc.

Josh

Clunietp
Feb 1st, 2001, 10:44 PM
You have to enable "Allow Parent Paths" in the Web App configuration thru the IIS manager

msdnexpert
Feb 2nd, 2001, 08:30 AM
Dear Clunietp,
Where do i set this setting in the web server. I mean where is IIS manager is it same as Administration site.

Clunietp
Feb 2nd, 2001, 09:58 AM
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

msdnexpert
Feb 3rd, 2001, 06:12 AM
Dear Clunietp,
"Enable Parent Paths" is enabled on my web server yet I am getting the error. Any other suggestions.

Clunietp
Feb 4th, 2001, 10:38 PM
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....