Microsoft KB Archive/836680

= FIX: Using one SQL database for all applications for SQL Server session state may cause a bottleneck =

Article ID: 836680

Article Last Modified on 4/7/2006

-

APPLIES TO


 * Microsoft .NET Framework 1.1
 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft ASP.NET 1.1

-







For a Microsoft .NET Framework 1.0 version of this article, see 820782.



SYMPTOMS
Microsoft SQL Server session state provides a longer and scalable use of session state in Microsoft ASP.NET. However, SQL Server session state uses the same SQL Server database for all applications that are in the same ASPNET process. This behavior may create a single point of failure or may create a bottleneck.



CAUSE
By design, all ASP.NET applications use the same database to store data when they use SQL Server session state. You cannot specify a database name for each application. However, after you apply this software update, you can include the database name in the SQL connection string of a configuration file in the sessionstate section.



RESOLUTION
To resolve this problem, if SQL Server session state is currently configured, remove it by using the original UninstallSqlState.sql script before you install this software update. For more information, see the &quot;References&quot; section.

This software update will install new InstallSqlStateTemplate.sql and UninstallSqlStateTemplate.sql files. Make a copy of these files for each Session database that you want to create. Modify each file by following the instructions that appear in the &quot;More Information&quot; section.

Note These instructions are also included in the comment section of the InstallSqlStateTemplate.sql file.

After you have completed the modifications, run the InstallSqlStateTemplate.sql file to install SQL Server session state for a specified database. After you configure the Session database, modify the sessionstate section of the Web.config file to reference a specific database for the session state, as in the following example:

Note In the following sample code, you must change user id=  and password=  to the correct values. Make sure that the user ID has the appropriate permissions to perform this operation on the database.  Note The sqlConnectionString now contains a parameter for database. In this example,  is the database that you specify for the session state.

Important This software update contains the following two types of packages:
 * A Microsoft Windows Installer package (.msi file)
 * An Optional Component Manager package (OCM)

If you use Microsoft Windows Server 2003, you must use the Windows Server 2003 (OCM) update because Windows Server 2003 File Protection monitors the .NET Framework 1.1 files. If you use an operating system that is different from Windows Server 2003, you must continue to use the Windows Installer package.

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 1 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:

http://support.microsoft.com/contactus/?ws=support

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.

File information
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 -  20-Mar-2004  04:35  1.1.4322.1014    258,048  Aspnet_isapi.dll 20-Mar-2004 04:35  1.1.4322.1014     20,480  Aspnet_regiis.exe 20-Mar-2004 04:35  1.1.4322.1014     32,768  Aspnet_state.exe 20-Mar-2004 04:35  1.1.4322.1014     32,768  Aspnet_wp.exe 16-May-2003 00:49                    33,522  Installpersistsqlstate.sql 16-May-2003 00:49                    34,150  Installsqlstate.sql 03-Oct-2003 19:20                    35,017  Installsqlstatetemplate.sql 20-Mar-2004 04:24  1.1.4322.1014     94,208  Perfcounter.dll 20-Mar-2004 04:30                     8,571  Smartnav.js   22-Mar-2004  04:43  1.1.4322.1014  1,220,608  System.dll 22-Mar-2004 04:43  1.1.4322.1014    241,664  System.messaging.dll 22-Mar-2004 04:43  1.1.4322.1014    323,584  System.runtime.remoting.dll 22-Mar-2004 04:43  1.1.4322.1014    131,072  System.runtime.serialization.formatters.soap.dll 22-Mar-2004 04:43  1.1.4322.1014  1,257,472  System.web.dll 22-Mar-2004 04:43  1.1.4322.1014    819,200  System.web.mobile.dll 22-Mar-2004 04:43  1.1.4322.1014    569,344  System.web.services.dll 22-Mar-2004 04:43  1.1.4322.1014  1,339,392  System.xml.dll 03-Oct-2003 19:20                     2,119  Uninstallsqlstatetemplate.sql 20-Mar-2004 04:30                    14,482  Webuivalidation.js



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Use the templates files to install the ASP.NET session state SQL objects
Use the Installsqlstatetemplate.sql templates file to install the ASP.NET session state SQL objects on a database that is different from the default ASPState database. To do this, follow these steps:
 * 1) Create your own script files by copying the two template files Installsqlstatetemplate.sql and Uninstallsqlstatetemplate.sql.
 * 2) Create a name for your database (for example, MyASPStateDB).
 * 3) In your own script files, replace all occurrences of   with the name of your database.
 * 4) Install and then remove ASP.NET session state SQL objects by using your own script files.

