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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.37.5