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

Latest Cloud Service Providers Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…