Include virtual does not work on 2003-server?

N

Niels Sloth

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
 
K

Ken Schaefer

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

: 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
 
N

Niels Sloth

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
 
N

Niels Sloth

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
 
K

Ken Schaefer

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


:
: 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
 
N

Niels Sloth

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
 
N

Niels Sloth

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top