Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 275447 - Last Review: August 7, 2007 - Revision: 3.3
PRB: ASP 0234 Error "Server Side Include Directives May Not Be Present in Script Blocks" with PageObject DTC
This article was previously published under Q275447
When you use the PageObject Design-Time Control (DTC) in a Web application that was created in Visual InterDev 6.0 Service Pack (SP) 2 or earlier, and you specify a server-side function or procedure as an Execute method of the PageObject, you may receive the following error message:
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.
/vdir/filename.asp,line XX
In Visual InterDev 6.0 SP2 and earlier, the following code to include the remote scripting page (Rs.asp) was added to the page within the server-side JavaScript block when an Execute method was specified in the
Methods tab of the PageObject properties:
<!--#INCLUDE FILE="_ScriptLibrary/rs.asp"-->
In Internet Information Server (IIS) 4.0, you can include files within server-side script blocks. In IIS 5.0, server-side include directives cannot be placed within a script block.
Microsoft Visual Studio 6.0 SP3 or later adds this line of code outside of the server-side script blocks. To resolve this problem, upgrade to Visual Studio 6.0 SP3 or later on your development computer. You can download the latest version of Visual Studio from the following Microsoft Web site:
For existing applications, you must delete the existing PageObject DTC and add a new one to update the code.
Steps to Reproduce Behavior
NOTE: Make sure that the Active Server Pages (ASP) page is created on a development computer with Visual InterDev 6.0 SP2 or earlier and is run on a Microsoft Windows 2000-based Web server.
- Add an ASP page named POTest.asp to your Visual InterDev project.
- Add the following server-side script block to POTest.asp:
<SCRIPT LANGUAGE=vbscript RUNAT=Server>
function testVal()
testVal = "From the server"
end function
</SCRIPT>
- Add a PageObject Design-Time Control to POTest.asp.
- Right-click PageObject, and then click Properties.
- On the Methods tab, in the Execute Methods drop-down list, click testVal. Save the page.
- In your Internet browser, view the page. You receive the ASP 0234 error.
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
280389Â
(http://kbalertz.com/Feedback.aspx?kbNumber=280389/EN-US/
)
PRB: ASP Error 0234 "Server-side include directives may not be present in script blocks" After You Upgrade to Windows 2000
261249Â
(http://kbalertz.com/Feedback.aspx?kbNumber=261249/EN-US/
)
PRB: No Data Is Returned from Server When You Use PageObject with Page Running on Windows 2000
APPLIES TO
- Microsoft Active Server Pages 4.0
- Microsoft Visual InterDev 6.0 Standard Edition
- Microsoft Internet Information Services 5.0
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate