Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Downloading Large Files Causes a Large Memory Loss and Causes the Aspnet_wp.exe Process to Recycle


View products that this article applies to.

Symptoms

When you use the Response.BinaryWrite method to download files that are 400 MB or larger from an ASP.NET page, the Aspnet_wp.exe process may recycle. You may see the following event logged in the application log of the Event Viewer:

Event Type: Error

Event Source: ASP.NET 1.1.4322.573

Event Category: None

Event ID: 1000

Date: 5/16/2002

Time: 11:01:11 AM

User: N/A

Computer: ComputerName

Description: Aspnet_wp.exe (PID: 9999) stopped unexpectedly.

↑ Back to the top


Cause

In this scenario, the following things occur:
  1. The code typically causes the download box to appear.
  2. The Inetinfo.exe process starts to heavily exhaust memory.
  3. Private Bytes in Inetinfo.exe increase until you run out of virtual memory.
  4. When you run out of virtual memory, you experience an unexpected recycle of the Aspnet_wp.exe process. (Private Bytes in Aspnet_wp.exe are not affected. The number of Aspnet_wp.exe Private Bytes does not significantly increase.)
  5. Inetinfo.exe does not release the memory until the download is complete or canceled.
Note If you perform simultaneous downloads, you may compound the problem.

↑ Back to the top


Resolution

Important This hotfix contains two types of packages: a Microsoft Windows Installer package and an Optional Component Manager package (OCM). If your computer is running the Microsoft Windows Server 2003 operating system, you must specify the Windows Server 2003 (OCM) update because Windows Server 2003 File Protection monitors the .NET Framework 1.1 files. If your computer is running an operating system other than Windows Server 2003, you must continue to use the Windows Installer package.

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.

The English version of this hotfix has the file attributes (or later) 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.
   Date         Time   Version       Size       File name
   ------------------------------------------------------------------------
   01-Aug-2003  19:47  1.1.4322.930    253,952  Aspnet_isapi.dll
   01-Aug-2003  19:47  1.1.4322.930     20,480  Aspnet_regiis.exe
   01-Aug-2003  19:47  1.1.4322.930     32,768  Aspnet_wp.exe
   16-May-2003  01:49                   33,522  Installpersistsqlstate.sql
   16-May-2003  01:49                   34,150  Installsqlstate.sql
   01-Aug-2003  19:38  1.1.4322.930     94,208  Perfcounter.dll
   02-Aug-2003  08:54  1.1.4322.930  1,216,512  System.dll
   02-Aug-2003  08:54  1.1.4322.930    323,584  System.runtime.remoting.dll
   02-Aug-2003  08:55  1.1.4322.930  1,253,376  System.web.dll
   02-Aug-2003  08:55  1.1.4322.930    819,200  System.web.mobile.dll
   02-Aug-2003  08:55  1.1.4322.930    569,344  System.web.services.dll
   02-Aug-2003  08:55  1.1.4322.930  1,335,296  System.xml.dll
   01-Aug-2003  19:42                   14,472  Webuivalidation.js

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

This hotfix adds an additional function to the Response object (Response.TransmitFile). You can use the function instead of the BinaryWrite function or instead of other functions to send files to the client. Also, this function can be used regardless of the size of the file that you want to transmit. To test this new functionality, paste the following code in an empty ASPX page after you download and install the hotfix. You must change the "c:\\repro\\z.zip" line in the code to reflect a path and a ZIP file that exist on a computer.
<script runat=server language=C#>
    void Page_Load() {
        Response.ContentType="application/x-zip-compressed";
        Response.AddHeader("Content-Disposition", "attachment;filename=z.zip");
        Response.TransmitFile("c:\\repro\\z.zip");
    } 
</script>

↑ Back to the top


Keywords: kbqfe, kbnetframe100presp3fix, kbqfe, kbfix, kbcodesnippet, kbbug, kbhotfixserver, KB823409

↑ Back to the top

Article Info
Article ID : 823409
Revision : 9
Created on : 10/25/2005
Published on : 10/25/2005
Exists online : False
Views : 427