Friday 2 March 2012

In asp.net three types of session storage described below

InProc:- use like as <sessionState mode="InProc" /> 

Storage location:- Asp.net Process memory area

Description:- This is the default session storage. Session data will be kept in the server memory. InProc mode is a high performance as it reads from the same processes memory and it allows you to keep all .NET types. If session mode is not specified, ASP.NET will use InProc as the default mode.

State server:-
<sessionStatemode="StateServer" stateConnectionStrin
g= "tcpip=Yourservername:42424" /> 




Storage Location:- Server memory as a seprate process

Description:- StateServer mode provides a basic level of isolation for the data storage. It runs as a separate windows service and keeps the session data out of ASP.NET process memory area. To access session, ASP.NET process has to communicate with this external process.


Sql server:- <sessionState mode="SQLServer" sqlConnectionString="..." /> 

Storage Location:- In SQL server database

Description:- If you still need more resillient storage, SQLServer mode is the choice. It allows to keep session data in SQLServer. This is helpful when your web application is hosted in a webfarm.

No comments:

Post a Comment