By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,584 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,584 IT Pros & Developers. It's quick & easy.

Include virtual does not work on 2003-server?

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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" <sl***@post1.tele.dk> wrote in message
news:73**************************@posting.google.c om...
: 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
Jul 19 '05 #2

P: n/a
> 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
Jul 19 '05 #3

P: n/a
On 8 Oct 2003 05:20:56 -0700, sl***@post1.tele.dk (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


Jul 19 '05 #4

P: n/a

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

P: n/a
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" <sl***@post1.tele.dk> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
:
: 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
Jul 19 '05 #6

P: n/a
which kinda indicates that there isn't a directory >called /websites off theroot 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!
Jul 19 '05 #7

P: n/a
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!
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.