FIX: A program that frequently uses the System.Net.WebRequest method experiences an OutOfMemoryException error in the .NET Framework 1.0 Service Pack 3 (893315)
The information in this article applies to:
- Microsoft .NET Framework 1.0 SP3
- Microsoft ASP.NET (included with the .NET Framework 1.0)
For a Microsoft .NET Framework 1.1 version of this article, see 831138.
SYMPTOMSIf you create a program by using the Microsoft .NET Framework 1.0 Service Pack 3 (SP3), and the program frequently uses the System.Net.WebRequest method, you experience an OutOfMemoryException error when you run the program.CAUSEThe .NET Framework uses the ServicePoint class to handle connections to the Internet. If the Web browser is configured to use a proxy server, only one ServicePoint connection object is created for all the connections for each program. However, if the computer is directly connected to the Internet, and the Web browser is not configured to use a proxy server, a ServicePoint connection object is created for each unique connection.
The System.Net namespace pins some memory to make a native call every time that the WebRequest object is invoked. However, the memory is not correctly collected when the ServicePoint object is disposed. If a program creates many ServicePoint objects, an OutOfMemoryException error occurs because the memory becomes fragmented in the unmanaged heap.
This problem may also occur if the computer is configured behind a proxy or behind a firewall that has a firewall client installed and the Web browser is not configured to use a proxy server.RESOLUTIONSoftware update informationA 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 Microsoft .NET Framework 1.0 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. PrerequisitesMicrosoft .NET Framework 1.0 SP3 Restart requirementYou must restart the computer after you apply this software update. Software update replacement informationThis software update does not replace any other software updates. File informationThe English version of this software update 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
--------------------------------------------------------------
20-April-2005 18:41:58 1.0.3705.6036 1,179,648 System.dll WORKAROUNDTo work around this problem, configure the Web browser to use a proxy server. To do this, follow these steps: - Start Microsoft Internet Explorer.
- On the Tools menu, click Internet Options.
- Click the Connections tab, and then click LAN Settings.
- Under Proxy server, click to select the Use a proxy server for your LAN check box.
- In the Address box, type the IP address of the proxy server.
- In the Port box, type the port number that is used by the proxy server for client connections. By default, this port number is 8080.
- If you do not want to use the proxy server computer when you connect to a computer that is on the local network, click to select the Bypass proxy server for local addresses check box. This change may speed up performance.
- Click OK two times.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 7/26/2006 |
---|
Keywords: | kbHotfixServer kbQFE kbBug kbfix kbNetFrame100preSP3fix kbpubtypekc KB893315 kbAudITPRO |
---|
|