PDA

View Full Version : Server Side Includes



russellcurtis
10-11-2002, 04:39 PM
Hello everyone. I'm struggling with what should be a fairly simple problem to solve, so sorry if this is a stupid question.

I'm trying to get a menu to appear in every page on my site using server-side includes in the form:

<!--#include file="/include/thisfile.asp" -->

assuming that the first forward-slash would locate the file from the root of the site. However, when I try this (I'm using MS IIS 5 on a Win2k machine) I get the following message:

Active Server Pages error 'ASP 0130'
Invalid File attribute
/directory/default.asp, line 9
File attribute '/include/thisfile.asp' cannot start with forward slash or back slash.

My question is, then, how can I reference a file relative to the server root without resorting to:

<!--#include file="http://www.mysite.com/include/thisfile.asp" -->

as I have a lot of these, and all these DNS queries will slow me right down.

Any help you guys can give would be really appreciated.

Cheers

Russell[I][B]Active Server Pages error 'ASP 0130'

Roy Sinclair
10-11-2002, 06:34 PM
<!--#include virtual="/include/thisfile.asp" -->


The configuration for ASP also has to be set to allow parent paths using the MMC for IIS.