In order for IIS (or any web server) to take your script and load it into memory for running on the server, it has to do a number of things.
One of the steps is to process include directives. What this means is, IIS looks for the #inlcude line and then tries to find the file and glue it into place.
Unfortunately, this only works when the #include is in the HTML part of your script.
Example that works:
Code:
<html>
<!-- #include file="whatever.inc"-->
<body>
<%
' some ASP here..
%>
</body>
</html>
Another example that works:
Code:
<!-- #include virtual="/functions.asp"-->
<%
' some ASP code here..
%>
This does
not work:
Code:
<%
' some ASP here..
<!-- #include file="whatever.asp"-->
' a little more ASP here..
%>
The problem is that the include directive is present inside your ASP script block!
It's just a rule and I didn't make it! :-)