HttpCompressionSchemeElement Class

Configures a compression scheme for dynamic or static content.

Syntax

class HttpCompressionSchemeElement : CollectionElement  

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the HttpCompressionSchemeElement class.

Name Description
Dll A nonempty read/write string value that specifies the fully qualified file system path and file name of the DLL associated with the compression scheme. You must restart the World Wide Web Publishing Service (WWW service) before any changes to this property will take effect.
DoDynamicCompression A read/write boolean value. true if IIS compresses responses to requests for dynamic content, such as scripts in ASP pages and ISAPI extensions; otherwise, false. The default is true. Note: Because this property cannot be inherited, you must set it to true at both the global level (HttpCompressionSection) and the individual scheme level if the Name property is set to "gzip". If you change this value at the individual compression scheme level, you must restart the WWW service before the change will take effect.
DoStaticCompression A read/write boolean value. true if IIS compresses responses to requests for static content; otherwise, false. The default is true. Note: Because this property cannot be inherited, you must set it to true at both the global level (HttpCompressionSection) and the individual scheme level if the Name property is set to "gzip". If you change this value at the individual compression scheme level, you must restart the WWW service before the change will take effect. Note: The static compression store needs to be located in a disk partition or remote share formatted with NTFS. If the file store is not NTFS, static compression is disabled. For security reasons, no compressed responses will be served from a FAT cache store.
DynamicCompressionLevel A read/write uint32 value that specifies the compression level, from 0 through 10, for dynamic content. 10 is the maximum amount of compression; 0 means that compression is disabled. The default is 0 (disabled). Higher levels of compression require more CPU cycles. Note: Because dynamic compression consumes considerable CPU time and memory resources, use it only on servers that have slow network connections but CPU time to spare. Compressed static responses can be cached and, therefore, do not affect CPU resources like dynamic responses do. Note: You must restart the WWW service before any changes to this property will take effect.
Name A nonempty read-only string value that specifies the name of the compression scheme. Supported values are "gzip" and "deflate". The key property.
StaticCompressionLevel A uint32 value that specifies the compression level, from 0 through 10, for static content. 10 is the maximum amount of compression; 0 means that compression is disabled. The default is 7. Higher levels of compression require more CPU cycles. Note: You must restart the WWW service before any changes to this property will take effect.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the HttpCompression property of the HttpCompressionSection class.

Inheritance Hierarchy

CollectionElement

HttpCompressionSchemeElement

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

CollectionElement Class
HttpCompressionMimeTypeElement Class
HttpCompressionSection Class
UrlCompressionSection Class