ASP.NET Session State Service
Fast2Host has enabled the ASP.NET Session State Service on all web servers. This ensures that session data is held by the service rather than the website worker process, preventing sessions from being lost when application pools are recycled.
Why This Matters
To maintain uptime and stability, application pools are recycled regularly — either after inactivity or once they reach a certain number of requests. Without the Session State Service, this recycling can cause session data to be lost.
By using the Session State Service, sessions remain intact even if the worker process is recycled.
Configuration in web.config
To take advantage of the Session State Service, edit your application’s web.config file
and specify the following:
<sessionState mode="StateServer" />
This tells ASP.NET to store session data in the State Server rather than in-process.
2025 Update Notes
- ASP.NET Framework: The
sessionStatesetting remains valid and recommended. - ASP.NET Core: Session state is configured via middleware in
Startup.csorProgram.cs, not inweb.config. - Classic ASP v3: Renaming
.aspfiles to.aspxis technically possible but considered legacy. Most customers now use ASP.NET Framework or Core.
Recycling Application Pools in Plesk
Sometimes you may need to manually recycle your application pool (for example, after configuration changes or troubleshooting). In Plesk, you can do this easily:
- Log in to your Plesk Control Panel.
- Navigate to Websites & Domains.
- Select the domain you want to manage.
- Click on IIS Application Pool (or ASP.NET Settings depending on your version).
- Click Recycle to restart the application pool.
Recycling clears the worker process and reloads your application, but with StateServer enabled, your sessions will remain intact.
Best Practices
- Always configure
sessionStateinweb.configfor applications requiring persistent sessions. - Use StateServer mode for reliability across application pool recycles.
- Consider SQLServer mode for distributed applications needing session persistence across multiple servers.
- Recycle your app pool via Plesk when troubleshooting, rather than restarting the entire site.
StateServer mode ensures your users stay logged in and session data is preserved,
even during application pool recycling.