SessionStateSection.CompressionEnabled Property

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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
Available since 4.0
Return to top