Skip to Content
Introducing .NET 4.0: with Visual Studio 2010
book

Introducing .NET 4.0: with Visual Studio 2010

by Alex Mackey
February 2010
Beginner content levelBeginner
400 pages
11h 13m
English
Apress
Content preview from Introducing .NET 4.0: with Visual Studio 2010

10.17. Compress Session State

It is generally a good rule to avoid storing anything in session unless absolutely necessary, but if you must, ASP.NET 4.0 allows you to compress session state. Session state compression cannot be used by an in-process session so is applicable only if your application is using state or SQL Server. To compress session state, simply set the compressionEnabled property to true in Web.config:

<sessionState compressionEnabled="true"></sessionState>

Session state is compressed using the GZip algorithm. It is important to note that compressing session requires a server to do more work so could adversely impact on the performance of your application.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 For Dummies®

ASP.NET 3.5 For Dummies®

Ken Cox
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9781430224556Purchase book