IKtech
asked on
sql session state (asp.net)
I have two server 2008 R2 64 bit servers running IIS for our webservers. We have an application hosted on theses servers that is .net. I want to try and use our sql server for session state but i am new to this topic and wanted to see what advice i could get from the experts.
Please let me know what, if any, documents have helped you set up a sql session state server. Also i would like to know if there is anything to watch out for or any issues with a similar setup.
The reason i am even attempting this is because i have had a few instances where users are kicked out and sent to the login page when they lose there session state. So i am open to suggestions on how to remedy that situation however i thought the sql system state might solve the problem. Thanks!
Please let me know what, if any, documents have helped you set up a sql session state server. Also i would like to know if there is anything to watch out for or any issues with a similar setup.
The reason i am even attempting this is because i have had a few instances where users are kicked out and sent to the login page when they lose there session state. So i am open to suggestions on how to remedy that situation however i thought the sql system state might solve the problem. Thanks!
It's really pretty simple. You run a script that creates a couple of tables and change the <sessionState> element in your web.config and you're done. This article explains how to do it.
http://support.microsoft.com/kb/317604
None of your code changes at all.
As far as your users getting kicked out because they lose their session state, that may be related to the session timing out or it may be related to the user being bounced from one server to another by the load balancer. You need to figure out which it is because simply moving the sessionState to the database won't solve the problem if it's due to the session timing out.
http://support.microsoft.com/kb/317604
None of your code changes at all.
As far as your users getting kicked out because they lose their session state, that may be related to the session timing out or it may be related to the user being bounced from one server to another by the load balancer. You need to figure out which it is because simply moving the sessionState to the database won't solve the problem if it's due to the session timing out.
Its good to use a sql session state. Make sure the objects you are setting to sessions are serializable (e.g. Classes) and the timeout period is not too high (20min is best)
Some more additional links for your need
Configure SQL Server to Store ASP.NET Session State -
http://support.microsoft.com/kb/317604
ASP.NET SQL Server Registration Tool
http://msdn.microsoft.com/en-us/library/ms229862.aspx
Useful links
http://forums.asp.net/p/1434137/3235693.aspx
http://blogs.msdn.com/b/akshayns/archive/2008/10/04/how-to-configure-sql-server-to-store-a-session-state.aspx
http://www.dirigodev.com/blog/web-development-execution/storing-aspnet-session-state-in-sql-server/
Configure SQL Server to Store ASP.NET Session State -
http://support.microsoft.com/kb/317604
ASP.NET SQL Server Registration Tool
http://msdn.microsoft.com/en-us/library/ms229862.aspx
Useful links
http://forums.asp.net/p/1434137/3235693.aspx
http://blogs.msdn.com/b/akshayns/archive/2008/10/04/how-to-configure-sql-server-to-store-a-session-state.aspx
http://www.dirigodev.com/blog/web-development-execution/storing-aspnet-session-state-in-sql-server/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
IT works!
ASKER