Although HTTP is a stateless protocol, Web applications can't just do without certain forms of state. Moreover, state management is a hot topic for all real-world Web applications. Setting up an effective and efficient solution for state management is often the difference between an application being scalable or nonscalable.
One of the most-used forms of state is session state that is, the state specific to a user and valid as long as that user works with the application. You can store session data in the memory of the ASP.NET worker process as well as in external processes, and even in a SQL Server table or in custom state provider. In spite of the radically different options, the top-level programming interface is identical. More important, the ASP.NET session state can be persisted in a Web farm or Web garden scenario as well.
In the next chapter, we'll deal with another extremely powerful form of state container the Cache object.