Include virtual does not work on 2003-server?

Discussion in 'ASP General' started by Niels Sloth, Oct 8, 2003.

  1. Niels Sloth

    Niels Sloth Guest

    Hi

    I have 9 asp-sites on a Win2003 server, and would like to use the same
    include file, but it does not work.

    The path for the servers default website (which is not where the
    problem is) is c:\inetpub\wwwroot\ and the rest of the sites are at
    c:\inetpub\wwwroot\websites\Site1\ , ..\Site2\ etc.

    I tried using the following on the secondary sites:
    <!--#include virtual="Websites/Include.asp" -->
    <!--#include virtual="/Websites/Include.asp" -->
    <!--#include file="../Include.asp" -->

    All works fine on my development machine (Win2k) and on the server
    (Win2003) when it is accessed through the LAN, but when I cut the LAN
    and access the server through www (e.g. http://www.site1.dk) it does
    not work.

    I suspect that the internet user does not have rights to the virtual
    path, but how do I solve that?

    Can anybody give a clue?

    As you may see from the above I am not a pro.

    Thanks.

    Niels from Denmark

    www.biopix.dk
     
    Niels Sloth, Oct 8, 2003
    #1
    1. Advertising

  2. Niels Sloth

    Ken Schaefer Guest

    Do you get an error? What is it?

    I suspect that "Enable Parent Paths" is not set (it's a security risk),
    however in that case the site shouldn't work no matter whether it's accessed
    locally or via an external DNS address.

    Cheers
    Ken

    "Niels Sloth" <> wrote in message
    news:...
    : Hi
    :
    : I have 9 asp-sites on a Win2003 server, and would like to use the same
    : include file, but it does not work.
    :
    : The path for the servers default website (which is not where the
    : problem is) is c:\inetpub\wwwroot\ and the rest of the sites are at
    : c:\inetpub\wwwroot\websites\Site1\ , ..\Site2\ etc.
    :
    : I tried using the following on the secondary sites:
    : <!--#include virtual="Websites/Include.asp" -->
    : <!--#include virtual="/Websites/Include.asp" -->
    : <!--#include file="../Include.asp" -->
    :
    : All works fine on my development machine (Win2k) and on the server
    : (Win2003) when it is accessed through the LAN, but when I cut the LAN
    : and access the server through www (e.g. http://www.site1.dk) it does
    : not work.
    :
    : I suspect that the internet user does not have rights to the virtual
    : path, but how do I solve that?
    :
    : Can anybody give a clue?
    :
    : As you may see from the above I am not a pro.
    :
    : Thanks.
    :
    : Niels from Denmark
    :
    : www.biopix.dk
     
    Ken Schaefer, Oct 8, 2003
    #2
    1. Advertising

  3. Niels Sloth

    Niels Sloth Guest

    > Do you get an error? What is it?

    It is: HTTP 500 - Internal server error

    > I suspect that "Enable Parent Paths" is not set (it's a security risk),
    > however in that case the site shouldn't work no matter whether it's accessed
    > locally or via an external DNS address.


    I tried to Enable Parent Paths, but it does not help.

    Could it be something with the permissions for the directory where the
    include file is sitting?

    Thanks.

    Niels
     
    Niels Sloth, Oct 8, 2003
    #3
  4. Niels Sloth

    Jeff Cochran Guest

    On 8 Oct 2003 05:20:56 -0700, (Niels Sloth) wrote:

    >> Do you get an error? What is it?

    >
    >It is: HTTP 500 - Internal server error


    Start here:

    Why do I get a 500 Internal Server error for all ASP errors?
    http://www.aspfaq.com/show.asp?id=2109

    Jeff


    >> I suspect that "Enable Parent Paths" is not set (it's a security risk),
    >> however in that case the site shouldn't work no matter whether it's accessed
    >> locally or via an external DNS address.

    >
    >I tried to Enable Parent Paths, but it does not help.
    >
    >Could it be something with the permissions for the directory where the
    >include file is sitting?
    >
    >Thanks.
    >
    >Niels
     
    Jeff Cochran, Oct 8, 2003
    #4
  5. Niels Sloth

    Niels Sloth Guest

    Thanks, i think I mentioned that I am not a pro.

    I enabled error messages and now I get:

    Active Server Pages error 'ASP 0126'

    Include file not found

    /testinclude.asp, line 3

    The include file '/websites/IncludeMicro2.asp' was not found.

    The address is BTW http://www.feriehuse.info/testinclude.asp .

    Does that give you a clue?

    Niels

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Niels Sloth, Oct 8, 2003
    #5
  6. Niels Sloth

    Ken Schaefer Guest

    If I type in:
    http://www.feriehuse.info/websites/
    I get: 404 File or Directory not found

    which kinda indicates that there isn't a directory called /websites off the
    root of the website.

    Add /websites as a virtual directory (if required) off the root of the
    website. then your include willl start working. remember (<!-- #include
    virtual=""-->) always starts from the root of the current website, not from
    the location of the current page.

    Cheers
    Ken


    "Niels Sloth" <> wrote in message
    news:...
    :
    : Thanks, i think I mentioned that I am not a pro.
    :
    : I enabled error messages and now I get:
    :
    : Active Server Pages error 'ASP 0126'
    :
    : Include file not found
    :
    : /testinclude.asp, line 3
    :
    : The include file '/websites/IncludeMicro2.asp' was not found.
    :
    : The address is BTW http://www.feriehuse.info/testinclude.asp .
    :
    : Does that give you a clue?
    :
    : Niels
     
    Ken Schaefer, Oct 9, 2003
    #6
  7. Niels Sloth

    Niels Sloth Guest


    >which kinda indicates that there isn't a directory >called /websites

    off the
    >root of the website.


    Which there is not, the default website on the server (www.biopix.dk)
    has its root in c:\inetpub\wwwroot\, the include file is in
    c:\inetpub\wwwroot\websites\IncludeMicro2.asp and finally the domain
    www.feriehuse.info has its root in
    c:\inetpub\wwwroot\websites\FeriehuseInfo\

    >Add /websites as a virtual directory (if required) off the >root of the

    website. Then your include willl start working.

    So i guess my question now is if I can add c:\inetpub\wwwroot\websites\
    as a virtual directory to the site www.feriehuse.info (and a newbie
    instruction how exactly to do it), or if I can address it in some other
    way?

    Thanks.

    Niels, Denmark

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Niels Sloth, Oct 9, 2003
    #7
  8. Niels Sloth

    Niels Sloth Guest

    Hi again all.

    I consulted my new 1748 p. 2003 bible, and found out how to create a
    virtual directory.

    Thanks for the lesson, and thank you for your patience. Maybe I shall
    finish A this month, and if I am lucky I can continue to B next month,
    and, who knows, go further to C next year.

    Thanks again.

    Niels, Denmark.



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Niels Sloth, Oct 9, 2003
    #8
    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. Andreas Bogenberger
    Replies:
    3
    Views:
    1,001
    Andreas Bogenberger
    Feb 22, 2008
  2. Daniel P.

    C+/CLI wrapper DLL does not work on Win 2003 Server IIS

    Daniel P., Feb 16, 2007, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    170
    Daniel P.
    Feb 16, 2007
  3. Zenobia

    How does #Include virtual work?

    Zenobia, Jun 29, 2004, in forum: ASP General
    Replies:
    2
    Views:
    188
    Larry Bud
    Jul 6, 2004
  4. David C

    Server.Execute does not work on 2003

    David C, Oct 27, 2004, in forum: ASP General
    Replies:
    5
    Views:
    181
    StephenMcC
    Oct 29, 2004
  5. rockdale

    include virtual in virtual directory?

    rockdale, Sep 3, 2008, in forum: ASP General
    Replies:
    3
    Views:
    473
    rockdale
    Sep 4, 2008
Loading...

Share This Page