ASP.NET Session Management is one of the important concepts in ASP.NET to store are retrieve data for ease of use during the life cycle of the application/ website.
As part of my task called - Revisiting basics, I have decided to take on this topic. Hence, in the next series of articles, we will discuss about all the available session management types/methods we have.
ASP.NET session management can be done in any of the following ways.
Application: Application session management is holding data at application level. This is done by storing data in the Application object by a key and assigning a value to it. Application session keys are available as global data and reside on the server's in memory of the asp.net worker process. There is more about this in an article on my blog.
Session state: Session management can be done using the session object with a key and assigning a value to it. The session objects are unique for every client. Thus there will be a session that holds different keys for every user. This as well stays at the server side. However, the default session state will not work in the case of web farms as your load balancer might turn your request to the available server and not to the same server every time. Developers working on web applications that are internally used and run on a single server might not be aware of these details.
Session sate has different modes in which it works.
- InProc
- OutProc
The OutProc has two different modes in it again.
- ASP.NET state server
- and SQLServer
- Custom (This is an exciting topic. I will explore this in detail as another article apart from sessionstate)
We will discuss more on this with code snippets in an article here on my blog.
0 comments:
Post a Comment