PRB: ASP 0234 Error "Server Side Include Directives May Not Be Present in Script Blocks" After You Upgrade to Windows 2000 (280389)



The information in this article applies to:

  • Microsoft Active Server Pages, when used with:
    • Microsoft Internet Information Server 5.0

This article was previously published under Q280389

SYMPTOMS

After you upgrade to Microsoft Windows 2000 and Internet Information Server (IIS) 5.0, you may receive the following error message with Active Server Pages (ASP) that specify include directives within a script block:
Active Server Pages, ASP 0234 (0x80004005)
Server side include directives may not be present in script blocks. Please use the SRC= attribute of the <SCRIPT> tag
This error does not occur on IIS 4.0.

CAUSE

In IIS 5.0, server-side include directives cannot be placed within a script block.

RESOLUTION

To resolve this error, move the code that specifies the server-side include outside (above) the script block.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create an include file named TestINC.inc, and then paste the following code:
    <%
    Response.Write "From TestINC.inc"
    %>
    					
  2. Create a new ASP page named TestASP.asp, and then paste the following code:
    <SCRIPT LANGUAGE=vbscript RUNAT=Server>
    <!--#include file="TestINC.inc"-->
    Response.Write "From TestASP.asp"
    </SCRIPT>
    					
  3. In your browser, view TestASP.asp. You receive the ASP 0234 error.

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kbprb kbWebServer KB280389