On Thu, 19 Aug 2004 12:59:29 -0700, "JR"
<an*******@discussions.microsoft.com> wrote:
Hi, I'm migrating my website to an IIS 6.0 server and all
the asp pages work fine except for the ones that reference
include files, even though I have "Enable parent paths"
enabled in the App/Options tab.
The include files are being called as
<!-- #include virtual="../includes/file.inc" -->
<!-- #include virtual="../includes/script.asp" -->
If I remove the parent path call it works just fine. I
don't understand why it's doing this if I clearly
have "Enable parent paths" turned on in the Application
Options tab. Is there someother place where it needs to be
turned on. The error sent back to the browser is a 500
internal server error but looking at the event viewer it
shows that it cannot find the include file.
Where is the include? And where is the include virtual looking?
Look at your code, look at what you posted and you have your answer.
An include virtual starts the path at the root of the web site. So if
your physical structure is:
c:\
c:\Inetpub
c:\Inetpub\Website
c:\Inetpub\Website\Includes
c:\Inetpub\Website\Includes\file.inc
Then this:
<!-- #include virtual="includes/file.inc" -->
Gives you this:
c:\Inetpub\Website\Includes\file.inc
And this (what you have):
<!-- #include virtual="../includes/file.inc" -->
Gives you this:
c:\Inetpub\Includes\file.inc
IIS6 won't let you traverse back a directory above the web site root,
and simply drops the request. IIS5 was looser in interpretations of
these types of violations.
Jeff
Jeff