Article ID: 894611 - Last Review: May 21, 2007 - Revision: 3.4 FIX: You may experience heap corruption and out-of-memory exceptions when you use the RegisterClientScriptBlock method or the RegisterStartupScript method to register a large client-side script block in the .NET Framework 1.1On This PageSYMPTOMSIn the Microsoft .NET Framework 1.1, when you use the RegisterClientScriptBlock method or the RegisterStartupScript method to register a large client-side script block, you may experience heap corruption and out-of-memory exceptions. CAUSEThis problem occurs when the client-side script block that you are registering is a very large string. Note When a string is very large, the runtime allocates memory in the large object heap instead of the regular managed heap. To avoid moving large objects in memory in the large object heap, the memory is not compacted. RESOLUTIONService pack informationTo resolve this problem, obtain the latest service pack for Windows Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:889100
(http://support.microsoft.com/kb/889100/
)
How to obtain the latest service pack for Windows Server 2003 Hotfix informationPrerequisitesThe .NET Framework 1.1 Service Pack 1 (SP1) is required.Restart informationYou do not have to restart the computer after you apply this hotfix.Registry informationYou do not have to change the registry.Hotfix file informationThe English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.Windows Server 2003Date Time Version Size File name -------------------------------------------------------------- 13-Apr-2005 22:08 1.1.4322.2315 258,048 Aspnet_isapi.dll 13-Apr-2005 22:08 1.1.4322.2315 32,768 Aspnet_wp.exe 13-Apr-2005 21:15 1.1.4322.2315 1,261,568 System.web.dll Windows 2000 and Windows XPDate Time Version Size File name -------------------------------------------------------------- 19-Mar-2005 05:10 1.1.4322.2302 258,048 Aspnet_isapi.dll 19-Mar-2005 05:10 1.1.4322.2302 32,768 Aspnet_wp.exe 19-Mar-2005 04:20 1.1.4322.2302 1,261,568 System.web.dll WORKAROUNDTo work around this problem, break the large string into smaller client-side script blocks. Then, individually register each client-side script block. Note If you register more than eight client-side script blocks, the order that you registered the blocks is not preserved. Therefore, if the execution of the client-side script depends on the order of the script block registration, the client-side scripts may not behave as you expect. STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Windows Server 2003 Service Pack 2. MORE INFORMATION
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
817032
(http://support.microsoft.com/kb/817032/
)
BUG: Script blocks not in the same order of registration when you add them to a page that uses RegisterClientScriptBlock() or RegisterStartupScript()
For more information about client-side script block registration methods, visit the following Microsoft Developer Network (MSDN) Web sites:Page.RegisterClientScriptBlock http://msdn2.microsoft.com/en-us/library/system.web.ui.page.registerclientscriptblock(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/system.web.ui.page.registerclientscriptblock(vs.71).aspx) Page.RegisterStartupScript http://msdn2.microsoft.com/en-us/library/system.web.ui.page.registerstartupscript(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/system.web.ui.page.registerstartupscript(vs.71).aspx)
| Article Translations
|
Back to the top
