Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Include virtual does not work on 2003-server?

Reply
Thread Tools

Include virtual does not work on 2003-server?

 
 
Niels Sloth
Guest
Posts: n/a
 
      10-08-2003
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
 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      10-08-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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


 
Reply With Quote
 
 
 
 
Niels Sloth
Guest
Posts: n/a
 
      10-08-2003
> 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
 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      10-08-2003
On 8 Oct 2003 05:20:56 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (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


 
Reply With Quote
 
Niels Sloth
Guest
Posts: n/a
 
      10-08-2003

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!
 
Reply With Quote
 
Ken Schaefer
Guest
Posts: n/a
 
      10-09-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
:
: 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


 
Reply With Quote
 
Niels Sloth
Guest
Posts: n/a
 
      10-09-2003

>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!
 
Reply With Quote
 
Niels Sloth
Guest
Posts: n/a
 
      10-09-2003
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
include virtual in virtual directory? rockdale ASP General 3 09-04-2008 02:36 PM
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
'' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. rote ASP .Net 2 01-23-2008 03:07 PM
ASP Error 0126 include file not found, when using ".." in include file path Eric ASP General 10 01-11-2007 07:38 AM
How does #Include virtual work? Zenobia ASP General 2 07-06-2004 06:01 PM



Advertisments