How to change the HTTP GZIP Compression Level for Dynamic Content in IIS7

compressiongzipiis-7

I would like to change the HTTP GZIP compression level in IIS7 from 0 to 4 as mentioned in these articles:

However I cannot see any reference in them (or http://www.iis.net/ConfigReference/system.webServer/httpCompression) on how to change the compression level from 0 – 10.

The compression page in IIS only has tick-boxes to enable/disable dynamic and static compression.

My Web.config file has the line:

Please can you tell me how I can do this?

Best Answer

You need to set it in the compression scheme:

http://www.iis.net/ConfigReference/system.webServer/httpCompression/scheme

for example to set it in gzip using AppCmd:

appcmd.exe set config -section:system.webServer/httpCompression /[name='gzip'].dynamicCompressionLevel:"5" /commit:apphost