Create A SQL Server Database for Storing ASP.NET Session State
Mis à jour: août 2005
S'applique à: Windows Server 2003, Windows Server 2003 with SP1
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.
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
On the Start menu, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.
In SQL Server Enterprise Manager, connect to the server running SQL Server that will store the session state.
On the Tools menu, click SQL Query Analyzer.
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).
On the Query menu, click Execute.
Ensure the query completed with no errors by reviewing the status in the lower window of the SQL Query Analyzer.
Close SQL Query Analyzer.
In SQL Server Enterprise Manager, in the console tree, expand the server node, and then click Databases.
In the details pane, verify that ASPState is listed.
Close SQL Server Enterprise Manager.
Ajouts de la communauté
Si vous souhaitez y participer,