Jack is Here, asp.net findings

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries for December, 2010

FIX: You receive an exception error message when you specify a Content-Length HTTP header that is larger than 2 GB in ASP.NET 2.0

Symptoms
In Microsoft ASP.NET 2.0, when you try to use the TransmitFile function to specify a Content-Length HTTP header that is larger than 2 gigabytes (GB), you receive the following exception error message:

Value was either too large or too small for an Int32. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.OverflowException: Value was either too large or too small for an Int32. Additionally, you may experience a problem with application pool restarts under a heavy load. This problem can cause a decrease in performance on a server that is running Microsoft Internet Information Services (IIS) and an ASP.NET Web application.
Resolution
This problem occurs when ASP.NET 2.0 tries to parse the value of the Content-Length HTTP header as an Int32 data type. Therefore, if the value of the header is more than the maximum value of an Int32 data type, an overflow exception occurs. The maximum value of an Int32 data type is 2,147,483,647.

FIX: You may receive a ‘System.Runtime.InteropServices.COMException’ exception when you try to access a WPF application by browsing a Web service

Symptoms
Consider the following scenario. On a computer that has .NET Framework 3.5 Service Pack 1 (SP1) installed, you run an ASP.NET Web service application that is hosted on Internet Information Services (IIS). You use a Windows Presentation Foundation (WPF)-based application to generate content context for the Web Site or Web service, for example, images. In this scenario, when you try to access the WPF application by browsing the Web service, you may receive the following message:

A first chance exception of type ‘System.Runtime.InteropServices.COMException’ occurred in PresentationCore.dll
Additional information: The program issued a command but the command length is incorrect. (Exception from HRESULT: 0×80070018)
Resolution
When the WPF application calls the NtRequestWaitReplyPort function to dispatch a message through a local procedure call (LPC) to Windows Manager Session Manager service (UXSMS) in the DwmGetTransportAttributes function, the E_ACCESSDENIED exception is returned. Then, the DwmGetTransportAttributes function tries to decode the message. However, the message was never handled because it is not a valid packet. Therefore, the code returns E_INVALID_COMMAND_LENGTH and triggers the exception.

FIX: Out of memory exception errors may occur when significant amounts of physical memory are still available

Symptoms
You may receive “out of memory” exception error messages, although as much as 2 gigabytes (GB) of physical memory is still available. This problem is most likely to occur when stress levels are reached and when you are using many large objects (objects that are over 85 kilobytes [KB]).
Resolution
To resolve this problem, obtain the latest service pack for .NET Framework 1.1. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
885055?(http://support.microsoft.com/kb/885055/) How to obtain Microsoft .NET Framework 1.1 Service Pack 1

FIX: Error message when you run a .NET Framework 2.0 Remoting application: “Unhandled Exception: System.AccessViolationException”

Symptoms
When you run a Microsoft .NET Framework 2.0 Remoting application, you may receive the following error message:

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Additionally, this problem may occur in .NET Framework 2.0 Remoting applications on a computer that is running certain types of driver software or antivirus programs.
Resolution
Hotfix information
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
To download this hotfix from the MSDN Code Gallery, visit the following Microsoft Web site:
http://code.msdn.microsoft.com/KB923028(http://code.msdn.microsoft.com/KB923028)
Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support(http://support.microsoft.com/contactus/?ws=support)PrerequisitesYou must have the .NET Framework 2.0 installed to apply this hotfix.Restart requirementYou do not have to restart the computer after you apply this hotfix.Software update replacement informationThis hotfix does not replace any other 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 item in Control Panel.The Microsoft .NET Framework 2.0, x86-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformMicrosoft.jscript.dll8.0.50727.794749,56818-Jan-200719:11x86System.dll2.0.50727.7942,940,92818-Jan-200719:11x86The Microsoft .NET Framework 2.0, x64-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformMicrosoft.jscript.dll8.0.50727.794749,56818-Jan-200719:11x86System.dll2.0.50727.7942,940,92818-Jan-200719:11x86Microsoft.jscript.dll8.0.50727.794749,56818-Jan-200718:49x64System.dll2.0.50727.7942,940,92818-Jan-200718:49x64The Microsoft .NET Framework 2.0, Itanium-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformMicrosoft.jscript.dll8.0.50727.794749,56818-Jan-200718:49IA-64System.dll2.0.50727.7942,940,92818-Jan-200718:49IA-64Microsoft.jscript.dll8.0.50727.794749,56818-Jan-200719:11x86System.dll2.0.50727.7942,940,92818-Jan-200719:11×86

FIX: An EXCEPTION_STACK_OVERFLOW exception may occur when you try to run a Transact-SQL query in SQL Server 2005

Symptoms
This article describes the following about this hotfix release: The issues that are fixed by this hotfix packageThe prerequisites for applying the hotfix packageWhether you must restart the computer after you apply the hotfix packageWhether the hotfix package is replaced by any other hotfix packageWhether you must make any registry changes after you apply the hotfix packageThe files that are contained in the hotfix package
Resolution
When you try to run a Transact-SQL query in Microsoft SQL Server 2005, an EXCEPTION_STACK_OVERFLOW exception may occur. When this problem occurs, the SQL Server service may stop unexpectedly.
Note This problem may only occur in SQL Server 2005 x64 editions.