⟩ What are different methods of session maintenance in ASP.NET?
3 types:
In-process storage.
Session State Service.
Microsoft SQL Server.
In-Process Storage
The default location for session state storage is in the ASP.NET process itself.
Session State Service
As an alternative to using in-process storage for session state, ASP.NET provides the ASP.NET State Service. The State Service gives you an out-of-process alternative for storing session state that is not tied quite so closely to ASP.NET’s own process.
To use the State Service, you need to edit the sessionState element in your ASP.NET application’s web.config file:
You’ll also need to start the ASP.NET State Service on the computer that you specified in the stateConnectionString attribute. The .NET Framework installs this service, but by default it’s set to manual start up. If you’re going to depend on it for storing session state, you’ll want to change that to automatic start up by using the Services MMC plug-in in the Administrative Tools group.
If you make these changes, and then repeat the previous set of steps, you’ll see slightly different behavior: session state persists even if you recycle the ASP.NET process.