ASP.NET 4 introduces a new option called ‘compressionEnabled’ to compress session state and improve application performance.
When you are storing session state in a State Server or SQL Server and have set the ‘compressionEnabled’ attribute to true, ASP.NET compresses session-state data. I have heard that internally it uses the GZip stream to compress and decompress session data.
Add the following entry in your web.config file with the compressionEnabled attribute set to true, as shown below:
Note: Since Compression and Decompression is involved, your application will consume additional CPU cycles to perform the operation. However compressing session state will lead to better performance of your application.
Giving me +1 tells me you liked this article! Thanks in advance
Did you like this post?
|
|
|
||
|
|
|
|
Save on Delicious |
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |




comments
2 Responses to "Compress Session State in ASP.NET 4"Compression enabled a new concept pretty interesting.
Good post!
Post a Comment