469,356 Members | 2,055 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

IIS6 500 Server Error Include File Not Found when running an asp script.

JR
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.

Thanks.
Jul 19 '05 #1
9 9182
The option of "virtual" in an include file sets it to the root of the
web. Basically what you are saying is after going to the root of the
web go to it's parent folder. So just get rid of the "../" as that
shouldn't be there with a "virtual" include.

JR 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.

Thanks.


Jul 19 '05 #2
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

Jul 19 '05 #3
It's going one directory up because it's one directory
deep.

My structure is as follows.

wwwroot/
wwwroot/include
wwwroot/carpages

Thus the pages inside carpages need to cd .. to go one
directory up into the include directory. This code worked
perfectly fine on IIS5
-----Original Message-----
The option of "virtual" in an include file sets it to the root of theweb. Basically what you are saying is after going to the root of theweb go to it's parent folder. So just get rid of the "../" as thatshouldn't be there with a "virtual" include.

JR 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.

Thanks.


.

Jul 19 '05 #4
It's going one directory up because it's one directory
deep.

My structure is as follows.

wwwroot/
wwwroot/includes
wwwroot/carpages

Thus the pages inside carpages need to cd .. to go one
directory up into the include directory. This code worked
perfectly fine on IIS5

-----Original Message-----
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 allthe asp pages work fine except for the ones that referenceinclude 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 beturned 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 ifyour 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 ofthese types of violations.

Jeff

Jeff

.

Jul 19 '05 #5
You're right it doesn't matter if it's one directory deep
it bases it off the root (I wonder why it worked in IIS5).

Thanks.
-----Original Message-----
It's going one directory up because it's one directory
deep.

My structure is as follows.

wwwroot/
wwwroot/includes
wwwroot/carpages

Thus the pages inside carpages need to cd .. to go one
directory up into the include directory. This code worked
perfectly fine on IIS5

-----Original Message-----
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 andallthe asp pages work fine except for the ones thatreferenceinclude 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 tobeturned on. The error sent back to the browser is a 500
internal server error but looking at the event viewer itshows 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

website. 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

.

.

Jul 19 '05 #6
You're right it doesn't matter if it's one directory deep
it bases it off the root (I wonder why it worked in IIS5).

Thanks.
-----Original Message-----
The option of "virtual" in an include file sets it to the root of theweb. Basically what you are saying is after going to the root of theweb go to it's parent folder. So just get rid of the "../" as thatshouldn't be there with a "virtual" include.

JR 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.

Thanks.


.

Jul 19 '05 #7
Let me try explaining it again the use of virtual sends you to the root
of the web the default being wwwroot. Then you tell it yo go to "../"
which is the parent of wwwroot & the default is Inetpub. So by setting
it to virtual="../includes/*" you are basically saying go to the
includes folder in the Inetpub folder. Since it does not exist you get
the error.

an*******@discussions.microsoft.com wrote:
It's going one directory up because it's one directory
deep.

My structure is as follows.

wwwroot/
wwwroot/include
wwwroot/carpages

Thus the pages inside carpages need to cd .. to go one
directory up into the include directory. This code worked
perfectly fine on IIS5

-----Original Message-----
The option of "virtual" in an include file sets it to the


root of the
web. Basically what you are saying is after going to the


root of the
web go to it's parent folder. So just get rid of


the "../" as that
shouldn't be there with a "virtual" include.

JR 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.

Thanks.


.


Jul 19 '05 #8
You're right it doesn't matter if it's one directory deep
it bases it off the root (I wonder why it worked in IIS5).

Thanks.
-----Original Message-----
Let me try explaining it again the use of virtual sends you to the rootof the web the default being wwwroot. Then you tell it yo go to "../"which is the parent of wwwroot & the default is Inetpub. So by settingit to virtual="../includes/*" you are basically saying go to theincludes folder in the Inetpub folder. Since it does not exist you getthe error.

an*******@discussions.microsoft.com wrote:
It's going one directory up because it's one directory
deep.

My structure is as follows.

wwwroot/
wwwroot/include
wwwroot/carpages

Thus the pages inside carpages need to cd .. to go one
directory up into the include directory. This code worked perfectly fine on IIS5

-----Original Message-----
The option of "virtual" in an include file sets it to the

root of the
web. Basically what you are saying is after going to
the
root of the
web go to it's parent folder. So just get rid of


the "../" as that
shouldn't be there with a "virtual" include.

JR 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 ApplicationOptions 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.

Thanks.

.


.

Jul 19 '05 #9
Because you didn't have one of the subdir's set up as it's own virtual
directory.

Jeff

<an*******@discussions.microsoft.com> wrote in message
news:9d****************************@phx.gbl...
You're right it doesn't matter if it's one directory deep
it bases it off the root (I wonder why it worked in IIS5).

Thanks.
-----Original Message-----
Let me try explaining it again the use of virtual sends

you to the root
of the web the default being wwwroot. Then you tell it

yo go to "../"
which is the parent of wwwroot & the default is Inetpub.

So by setting
it to virtual="../includes/*" you are basically saying go

to the
includes folder in the Inetpub folder. Since it does not

exist you get
the error.

an*******@discussions.microsoft.com wrote:
It's going one directory up because it's one directory
deep.

My structure is as follows.

wwwroot/
wwwroot/include
wwwroot/carpages

Thus the pages inside carpages need to cd .. to go one
directory up into the include directory. This code worked perfectly fine on IIS5


-----Original Message-----
The option of "virtual" in an include file sets it to the
root of the

web. Basically what you are saying is after going to the
root of the

web go to it's parent folder. So just get rid of

the "../" as that

shouldn't be there with a "virtual" include.

JR 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.
>
>Thanks.
>
>

.


.

Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mark J. McGinty | last post: by
12 posts views Thread by tshad | last post: by
10 posts views Thread by Ger | last post: by
21 posts views Thread by one2001boy | last post: by
2 posts views Thread by akhilesh.noida | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.