Article ID: 894611
Article Last Modified on 5/21/2007
APPLIES TO
- Microsoft .NET Framework 1.1
SYMPTOMS
In 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.
CAUSE
This 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.
RESOLUTION
Service pack information
To 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 How to obtain the latest service pack for Windows Server 2003
Hotfix information
Prerequisites
The .NET Framework 1.1 Service Pack 1 (SP1) is required.
Restart information
You do not have to restart the computer after you apply this hotfix.
Registry information
You do not have to change the registry.
Hotfix file information
The 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 2003
Date 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 XP
Date 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
WORKAROUND
To 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.
STATUS
Microsoft 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 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
Page.RegisterStartupScript
http://msdn2.microsoft.com/en-us/library/system.web.ui.page.registerstartupscript(vs.71).aspx
Keywords: kbwinserv2003sp2fix kbqfe kbhotfixserver kbprogramming kbnetframe110presp2fix kbbug kbfix kbprb KB894611