IIS6, Create A SQL Server Database for Storing ASP.NET Session State

Create A SQL Server Database for Storing ASP.NET Session State in The Network Encyclopedia Tutorials and Documentation (IIS 6.0 Deployment Guide)

Create A SQL Server Database for Storing ASP.NET Session State

ASP.NET SQL state server is used to manage session state on a computer running Microsoft® SQL Server™. All versions of Microsoft ASP.NET that are installed on the same computer share the same SQL state server. The SQL state server version of session state that is used is always the one that is installed with the latest version of ASP.NET. When this version of ASP.NET is uninstalled, the latest remaining version on the computer is then registered and used in its place.

Requirements

Iis.msc.

Recommendation

As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type runas /user:administrative_accountname mmc %systemroot%\system32\inetsrv\iis.msc.
  Create an ASP.NET session state database with SQL Server Enterprise Manager
 
1. On the Start menu, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.
2. In SQL Server Enterprise Manager, connect to the server running SQL Server that will store the session state.
3. On the Tools menu, click SQL Query Analyzer.
4. In SQL Query Analyzer, on the File menu, click Open, and navigate to InstallSqlState.sql (the SQL script that builds the ASP.NET session state database).

The InstallSqlState.sql file is located on the Web server in systemroot\Microsoft.NET\Framework\version (where version is the most recent version number of the .NET Framework installed on the Web server).

5. On the Query menu, click Execute.
6. Ensure the query completed with no errors by reviewing the status in the lower window of the SQL Query Analyzer.
7. Close SQL Query Analyzer.
8. In SQL Server Enterprise Manager, in the console tree, expand the server node, and then click Databases.
9. In the details pane, verify that ASPState is listed.
10. Close SQL Server Enterprise Manager.