Last post Apr 22, 2015 06:55 AM by gtscdsi
Apr 13, 2015 03:48 PM|CCGPlayer|LINK
I have a web site that is installed on two servers that is connected to a load balancer. I have added the following to the web.config file to enable the ASP.NET session state database on the two servers: (I'm have used the following page as a guide: https://support.microsoft.com/en-us/kb/323262)
sqlConnectionString="data source= ServerName;
During testing, I'm noticing that I'm getting a new entry in the ASP session state database, which is good, but there is one thing I'm wondering about. When you have the ASP.NET Session State database setup in a load balanced environment, wouldn't that
grant the ability to seamlessly switch to the second server under the load balancer when the first server happens to go down?
Apr 22, 2015 06:55 AM|gtscdsi|LINK
The answer is yes, sql server will hold all session data in its table and web servers will acquire these data from the same sql server.
Sql Server is the most reliable option for session state, can be used with web farms and web gardens and more scalable than state server and InProc session state modes.
Also you should to know that Sql server state mode would be slower than State Server and InProc Session state modes and complex objects need to be serialized and deserialized.
Consider about cloud for today, you may want to know there is another option for this requirement, please refer to the following link for detailed information: