HttpCompressionSchemeElement Class [IIS 7 and higher]

IIS 7.0

Configures a compression scheme for dynamic or static content.

class HttpCompressionSchemeElement : CollectionElement

This class contains no methods.

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.

NoteNote:
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.

NoteNote:
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.
NoteNote:
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.

NoteNote:
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.
NoteNote:
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.

NoteNote:
You must restart the WWW service before any changes to this property will take effect.

This class contains no subclasses.

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

CollectionElement

   HttpCompressionSchemeElement

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

Community Additions

ADD
Show: