Articles → .NET → Storing Session in database

Storing Session in database







•  Memory of the web server(in process).

•  Memory of the machine dedicated to store session variables(state server).

•  In SQL Server database.



•  

•  

•  


Configuring Sql Server for storing session state




•  

•  

•  



aspnet_regsql -ssadd(or -ssremove)  -S <server_name> -E -sstype p


•  

•  

•  

•  

•  

•  



•  







•  



aspnet_regsql -ssadd -S .sqlexpress -E -sstype p
	   





Click to Enlarge


Configuring website to store the session state






•  











•  

•  



<sessionState mode="SQLServer" sqlConnectionString="data source=.sqlexpress; integrated security=true"> </sessionState>



Posted By  -  Karan Gupta
 
Posted On  -  Friday, October 15, 2010

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250