Enabling Session State Compression in ASP.NET 4.0
In ASP.NET, Session is a server-side state management technique that helps you to preserve user specific data in memory so that they can be accessed and used when required. If the data that is to be stored in the session is large, it would consume more server resources. Now, Session data can be stored in either of the following two modes:
ASP.NET 4 now comes with in-built support for compressing Session data for storing out-of-process sessions. To enable this feature, just set the compressionEnabled attribute to "true" as shown in the code snippet below:
- In Process - Stored in the same ASP.NET Process
- Out of Process - Stored in the database or in some other system
stateConnectionString="some connection string..."