Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,
I m using session in my website. I have used mode=SQLServer, like following.

C#
<sessionstate mode="SQLServer" ....

Now as i save some thing in session, i can see row with value in my sqlserver's 'ASPStateTempSessions' table. But as I set value for session and close the browser i am not able to get the session value back. If it is saved in sqlserver it must comes?

Please help.
Posted
Updated 28-Dec-13 3:59am
v2
Comments
ZurdoDev 28-Dec-13 11:10am    
What? This is not clear.
Sampath Lokuge 28-Dec-13 11:47am    
Check this article : http://www.itorian.com/2012/09/aspnet-session-states-in-sql-server.html
joginder-banger 28-Dec-13 12:48pm    
sorry what's you try??

1 solution

Nope.You're wrong here.When you close the browser, you cannot get that session again.The idea of storing session on Sql server is the scenario where you have a web farm for your app.At that time even though your one of the IIS server down, still you can access the session which you stored on db by using downed (failed) IIS server.But you cannot do this by using default in process session.

Please read below mentioned article for more info:

How to use ASP.NET session state SQL Server Mode in a failover cluster
 
Share this answer
 
v2
Comments
Brijesh Kr 29-Dec-13 8:30am    
This is useful
Thanks
Sampath Lokuge 29-Dec-13 8:35am    
You're warmly welcome.If you feel this is the Answer,Accept it.It'll help for the user who will have the same issue in the future.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900