SQL Server Session Management Mode in .NET
page 3 of 8
by Sandeep Acharya
Feedback
Average Rating: 
Views (Total / Last 10 Days): 34141/ 71

SQLServer Session Mode Vs InProc Session Mode

There is a problem in InProc Mode of session management- it clears all the sessions when the worker process re-starts. But this can be solved easily when the mode is SQL Server. It keeps the sessions away from the Web Server and solves the above stated issue.

In the case of InProc mode, you can keep anything in session. This anything includes simple variables to complex objects. But there are some limitations for SQL Server Session management. You simply cannot dump the variables into the session that you used to do in InProc mode. In SQL Server mode the session variables are getting Serialized and then stored in SQL Server. Similarly, you need to De-Serialize them while retrieving.

From the above point it can be easily understood that, in SQL Server mode, you cannot store the objects which are not Serializable. To store complex objects into sessions you have to make them Serialized.

Performance also plays a role here. In InProc mode you can directly store and retrieve the values, but in SQL Server management it internally hits the database each time for any session related matters hindering the performance of the application.

Apart from that, Serialization and DeSerialization is also a needed requisite for SQL Server session mode.


View Entire Article

User Comments

Title: SerializeData list arrays   
Name: Sachin Kulkarni
Date: 2009-05-18 5:05:50 AM
Comment:
Hi,
I read the article it is very good information. I have just one question does the SerializeData function Serialize the system.collection objects too. As you are using the .Net Serialize method.
If not how can I do it?

Thanks in advance,
sachin
Title: SQL Server Session Management Mode in .NET   
Name: Ravikumar Bhuvanagiri
Date: 2009-02-13 11:41:18 AM
Comment:
This Article is very usefull.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-12 5:27:17 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search