Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SessionStateSection.CompressionEnabled Property

.NET Framework 4.6 and 4.5

Gets or sets a value that indicates whether compression is enabled for session-state data.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("compressionEnabled", DefaultValue = false)]
public bool CompressionEnabled { get; set; }

Property Value

Type: System.Boolean
true if compression is enabled; otherwise false. The default is false.

When the CompressionEnabled value is set to true, ASP.NET uses the GZipStream class to compress and expand session-state data.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft