"masonj" wrote:
: For no apparent reason, my webpage cannot be brought up due to an
: internal server error. My host tells me an asp 0126 error occurred
: because an include file is missing. Its there. I've also checked the
: code in the .asp and found everything to be accurate (I mean nothing
: has changed and it was working fine before). Any ideas? I can post
: the code if you'd like to see it.
It's not where you're telling it.
Here are the issues I had when first using includes:
1. You have two options: file and virtual
2. Correct syntax:
If current path is /files
<!--#include file="somefile.asp--> ' current directory
<!--#include file="../asp/somefile.asp--> ' other directory off parent path
<!--#include file="inc/somefile.asp--> ' other directory off current path
<!--#include virtual="/asp/somefile.asp--> ' other directory off root
<!--#include virtual="../asp/somefile.asp--> ' other directory off parent
path
<!--#include virtual="inc/somefile.asp--> ' other directory off current path
3. Incorrect syntax:
<!--#include file="/asp/somefile.asp--> ' other directory off root path
This will generate an ASP 0130 error because you cannot precede the path
with a / or a \.
4. Referencing file in wrong location:
<!--#include file="asp/somefile.asp-->
If you were in /files and /asp is where the file is, then this is incorrect.
If you're using FILE instead of VIRTUAL, then you had to remove the / and
possibly just put in asp/somefile.asp but you can't get there from here.
It will generate an ASP 0126 error in this format:
Active Server Pages error 'ASP 0126'
Include file not found
/filename.asp, line #
The include file 'somedirectory/somefile.asp' was not found.
You will either need:
<!--#include file="../asp/somefile.asp-->
or
<!--#include virtual="/asp/somefile.asp-->
If you're using virtual, then the same applies. This is why I ALWAYS use
virtual because I always know where the root is and it doesn't matter what
directory I'm in. I just start at the virtual root.
5. The other possibility is you're just pointing to the wrong directory or
you're running Sun's Chili!Soft, on a *nix box and the filenames are
case-sensitive.
HTH...
--
Roland
This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
-Technet Knowledge Base-
http://support.microsoft.com/default...&ln=EN-US&FR=0
-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp