Overview of session modes and types in asp.net:
Normally http protocol is stateless to maintain state following namespace is used.
System.Web.SessionState.HttpSessionState
Modes And's Provider:
Session State Mode State Provider
InProc In-Memory Object
StateServer Aspnet_state.exe
SQLServer DataBase
Custom CustomProvider
Session Event's:
There are two types of session events available in asp.net
* Session_Start
* Session_End
Types:
1.inproc Mode (ie inprocess)--->Its availble inside the webserver itself not ouside the application.
2.StateserverMode(ie out process) -->Its availble outside the webserver,not inside the application.
3.sqlserver Mode -->To store session datas in sqlserver.AND DATAS CAN BE SHARED BETWEEN OTHE APPLICATIONS.
4.Custom Mode --> To create a manual session id's.
1.inproc Mode
Advantages :
* It store Session data in memory object of current application domain. So accessing data is very fast and data is
easily available.
*Datas not alive when application restarted.
* There is not requirements of serialization to store data in InProc Session Mode.
* Implementation is very easy, just similar to using View State.
DisAdvantage:
If the worker Process or application domain recycles all session data will be lost.
2.StateserverMode
This session state is totally managed by aspnet_state.exe.
This approaches has several disadvantages due to the overhead of serialization and de-serialization.
Datas will be alive it the aspnet services restarted also.
3.sqlserver Mode
The most easiest way to configure SQL Server, is using aspnet_regsql command.
4.Custom Mode --> To create a manual session id's.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment