In ASP.NET, there are the
following session modes available:
•
InProc
We can choose the session state provider based on which
session state we are selecting. When ASP.NET requests for information based on
the session ID, the session state and its corresponding provider are
responsible for sending the proper information.
The following are session mode along with the provider
name:
- InProc: In Memory Object.
- State server: asp.net _state.exe
- SQLServer: Database
- Custom: Custom Provider
Apart
from that, there is another mode off. If we select this option, the
session will be disabled for the application. But our objective is to use
session, so we will look into the above four session state modes.
Session
state essentially means all the settings that you have made for your web
application for maintaining the session. Session State itself is a big thing.
It says all about your session configuration, either in the web.config or from
the code-behind. In the web.config, <SessionState> elements are used for
setting the configuration of the session. Some of them are Mode, Timeout,
StateConnectionString, CustomProvider, etc. I have discussed about each and
every section of the connection string. Before I discuss Session Mode, take a
brief overview of session events.
web is stateless, which means a new instance of a web
page is re-created each time the page is posted to the server. Http is a
stateless Protocol ,it can’t hold client information on a page. If the user
inserts some information and move to the next page ,that data wil be lost and
the user would not be able to retrieve the information
we need to store information .session provides the
facility to store information on server memory .it can support any type of
object to store along with our custom objects.For Every client ,session data is
stored separately,which means session data is stored on per client basis.
No comments:
Post a Comment