what is session state in asp.net .i need 5 important points
what is session state in asp.net .i need 5 important points
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Apr 4, 2012, 10:44 AM
1) Session state is server side state management mechanism in asp.net and data is persist across the post backs.
2) It can be shared across the web pages. It is user basis. Every logged in user will have the separate session.
3) There are three ways to hold the session value in the application. They are InProc, OutProc, Sql server
4) Inproc is most prefer method, which stores the session state in the asp.net worker processor. It is nothing but the iis processor (aspnet_wp.exe). When you restarts the IIS, the session will be expired.
5) OutProc will maintain the session state in the state server. It can be on the same machine or remote machine. Session will store on aspnet_state.exe. Many application can store the session on the state server and many number of application can share same session.
6) Sql server mode is stored the session state in the sql server database and it will make network traffic. It needs encryption and decryption every time while storing in sql server.
MuthuMari MPosted Apr 4, 2012, 7:45 AM
ASP.NET Session state is nothing but, it provides a place to store values that will persist across page requests. Values stored in Session are stored on the server and will remain in memory until they are explicitly removed or until the Session expires.
InProc : - Session state is stored in memory space of ASP.NET worker process.
( I.e. Aspnet_wp.exe)
This is the default setting, if the IIS reboots or the windows application restarts then the session state is lost.
State Server :-
Session state is stored outside ASP.NET worker process and is managed by Windows service. Location of this service is specified by stateConnectionString attribute.
Session state is serialized & stored in a separate process ie aspnet_state.exe.(session state stored in a separate computer)
SQLServer :-
Session state is serialized & stored in a Sql server DB.
Session state is stored outside ASP.NET worker process in SQL Server database. Location of this database is represented by sqlConnectionString attribute.
Other ways to maintain state
Hiddenfields,query string, viewstate etc,
Thanks.