Don't miss an insight. Subscribe to Techopedia for free.


Session State

What Does Session State Mean?

Session state, in the context of .NET, is a method keep track of the a user session during a series of HTTP requests. Session state allows a developer to store data about a user as he/she navigates through ASP.NET web pages in a .NET web application.


The concept of a session is generic and applies to most web servers. Session state however is a Microsoft-centric concept.

Techopedia Explains Session State

The HTTP protocol is stateless, which means that HTTP has no built-in way to keep track of a user as they navigate from one webpage to another. As a result, there are a number of other methods used to maintain state. These include session state, cookies, hidden form fields (known as viewstate in .NET), passing variables through the querystring, and form posts.

The biggest downside of session state is that state is maintained in the application pool of IIS on the webserver. This isn’t an issue with one server, but it causes problems when scaling out to have multiple servers. The solution is to move to a state server, where session state is stored on a 3rd party server. Storing session state in the application pool also means that data is lost if the server is rebooted.


Related Terms