If Session management mode is SQL Server, then all the
sessions and session variables are getting stored in a SQL Server. To make this
type of session management active we need to do the following changes in
Web.Config.
We need to modify the sessionState mode = "InProc"
to "SQLServer."
We need to give the appropriate connection string for the
SQLServer: [sqlConnectionString="data source=127.0.0.1;user id=sa;
password=xxxx"].
We also need to create the DB structure, which will actually
hold our sessions and session variables. For that we need to perform the
following step.
Find the InstallSqlState.sql file at [system drive\ Windows\
Microsoft.NET\ Framework\version\].
Run this script for the SQLServer that is going to maintain
the session.
This script will create the necessary DB structures to
maintain the session in the SQL Server.
Now it is all ready to use the SQL Server Session management.