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.1 (894611)



The information in this article 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

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next .NET Framework 1.1 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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.

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:


Modification Type:MajorLast Reviewed:4/7/2006
Keywords:kbQFE KBHotfixServer kbProgramming kbNetFrame110preSP2fix kbBug kbfix kbprb KB894611 kbAudDeveloper