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

Discussion in 'ASP General' started by JR, Aug 19, 2004.

  1. JR

    JR Guest

    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.
    JR, Aug 19, 2004
    #1
    1. Advertising

  2. JR

    joker Guest

    Re: IIS6 500 Server Error Include File Not Found when running anasp script.

    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.
    >
    >
    joker, Aug 20, 2004
    #2
    1. Advertising

  3. JR

    Jeff Cochran Guest

    On Thu, 19 Aug 2004 12:59:29 -0700, "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.


    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
    Jeff Cochran, Aug 20, 2004
    #3
  4. JR

    Guest Guest

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

    >
    >.
    >
    Guest, Aug 20, 2004
    #4
  5. JR

    Guest Guest

    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"
    ><> 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
    >
    >.
    >
    Guest, Aug 20, 2004
    #5
  6. JR

    Guest Guest

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

    >.
    >
    Guest, Aug 20, 2004
    #6
  7. JR

    Guest Guest

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

    >
    >.
    >
    Guest, Aug 20, 2004
    #7
  8. JR

    joker Guest

    Re: IIS6 500 Server Error Include File Not Found when running anasp script.

    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.

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

    >>
    >>.
    >>
    joker, Aug 20, 2004
    #8
  9. JR

    Guest Guest

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

    >
    >.
    >
    Guest, Aug 20, 2004
    #9
  10. JR

    Jeff Dillon Guest

    Because you didn't have one of the subdir's set up as it's own virtual
    directory.

    Jeff

    <> wrote in message
    news:9dfa01c486c0$37ff2f50$...
    > 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.
    > >
    > > 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.
    > >>>>
    > >>>>
    > >>>
    > >>>.
    > >>>

    > >
    > >.
    > >
    Jeff Dillon, Aug 20, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Dearlove

    IIS6 POST request failing with 500 error

    Ed Dearlove, Aug 19, 2004, in forum: ASP .Net
    Replies:
    11
    Views:
    4,555
    Ed Dearlove
    Aug 19, 2004
  2. Andreas Bogenberger
    Replies:
    3
    Views:
    888
    Andreas Bogenberger
    Feb 22, 2008
  3. David A. Beck

    IIS6 doesn't include client side script

    David A. Beck, Jul 14, 2003, in forum: ASP General
    Replies:
    3
    Views:
    135
    David A. Beck
    Jul 14, 2003
  4. Eric
    Replies:
    10
    Views:
    451
  5. Eric
    Replies:
    0
    Views:
    248
Loading...

Share This Page