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: Severe Performance Issues When You Bind Session State to Threads in ASPCompat Mode


View products that this article applies to.

Symptoms

This hotfix provides some performance improvements when you use single-threaded apartment (STA) components in your ASP.NET application. These performance improvements occur in the following scenarios:
  • Storing STA components in Session state
    When you store STA components in Session state, all access to the STA component is bound to the thread where it was created. When later requests are run on a different thread, access to the STA component must go through the original thread where it was created. This behavior causes a cross-apartment call and a thread switch, and severely affects performance. The new behavior binds sessions to the original thread where they were created. Therefore, later requests are bound to the original thread.
  • Creating STA components in a Session_Start event and storing them in Session state
    When you create STA components in the Session_Start event, components are bound to the main STA thread. This behavior causes access to all STA components that are created in the Session_Start event to be limited to this single thread. The new behavior allows STA components that you create in the Session_Start event not to run on the main STA thread.
Note When you use STA components from an .aspx Web page, the AspCompat attribute of the Page directive must be set to true. The AspCompat attribute forces the page to run on a thread in the STA thread pool.

↑ Back to the top


Resolution

How to Obtain the Hotfix

This issue is fixed in the June 2003 ASP.NET Hotfix Package 1.1. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
821156 INFO: ASP.NET 1.1 June 2003 Hotfix Rollup Package
You cannot obtain this fix individually. You must install the rollup.

Note When you request this hotfix, you receive the rollup.

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
		   -----------------------------------------------------------------------
		   07-Jun-2003  00:44  1.1.4322.910    253,952  Aspnet_isapi.dll
		   07-Jun-2003  00:44  1.1.4322.910     20,480  Aspnet_regiis.exe
		   07-Jun-2003  00:44  1.1.4322.910     32,768  Aspnet_wp.exe
		   15-May-2003  23:49                   33,522  Installpersistsqlstate.sql
		   15-May-2003  23:49                   34,150  Installsqlstate.sql
		   07-Jun-2003  12:52  1.1.4322.910  1,216,512  System.dll
		   07-Jun-2003  00:39                   14,472  Webuivalidation.js
		   07-Jun-2003  12:52  1.1.4322.910  1,249,280  System.Web.dll

If you applied the hotfix in this article for Microsoft ASP.NET included with the .NET Framework 1.0, and if you upgraded to Microsoft ASP.NET included with the .NET Framework 1.1, apply the hotfix package from the following Microsoft Knowledge Base article:
821156 INFO: ASP.NET 1.1 June 2003 Hotfix Rollup Package
Additionally, if you upgraded to the .NET Framework 1.1, and if you experience the symptoms in this article, apply the hotfix package from this Microsoft Knowledge Base article.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


Keywords: KB817005, kbbug, kbfix, kbnetframe100presp3fix, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 817005
Revision : 7
Created on : 9/27/2005
Published on : 9/27/2005
Exists online : False
Views : 429