TechShri from Shriniwas Wani

Custom Search

10 February, 2008

SQL Server for Session Management

How to Configure SQL Server for ASP.NET SQL Server Session State


Run the InstallSqlState.sql and the UninstallSqlState.sql script files to configure SQL Server mode session state management.

By default, InstallSqlState.sql is located in one of the following folders:
system drive\WINNT\Microsoft.NET\Framework\version\
system drive\Windows\Microsoft.NET\Framework\version\

After InstallSqlState.sql opens in SQL Query Analyzer, click Execute on the Query menu to run the script.

Modify the Web.config File of Your Application

To implement ASP.NET SQL Server mode session state management, you must modify the element of your application's Web.config file as follows:
1.
Set the mode attribute of the element to SQLServer to indicate that session state is stored in SQL Server.
2.Set the sqlConnectionString attribute to specify the connection string for SQL Server. For example:
sqlConnectionString="data source=MySQLServer;user id=;password="

Note The user, < user name > , must have permissions to perform this operation on the database.



~~~~ UnInstalling ~~~~~~~~~
7.
After UninstallSqlState.sql opens in SQL Query Analyzer, click Execute on the Query menu to run the script.
8.After you uninstall SQL Server mode session state management configuration, you must restart the w3svc service. To restart the w3svc process, type net start w3svc at a command prompt.

Labels:

0 Comments:

Post a Comment

<< Home