I'm trying to enable GZIP compression on IIS 7.5.
I think all the settings are okay.
In ApplicationHost.config I have this httpCompression section:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" minFileSizeForComp="0">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
</staticTypes>
</httpCompression>
And this urlCompression section:
<urlCompression dostaticcompression="true" />
and Here is Failed Request Tracing result:
STATIC_COMPRESSION_NOT_SUCCESS
Reason="UNKNOWN_ERROR"
If I look at web.config of the html5-boilerplate project they use this method:
https://github.com/paulirish/html5-boilerplate-server-configs/blob/master/web.config
Perhaps it's the zero value you have specified, or the directory path you are using.
See also
I suggest checking that the application pool user account, if you have any, has specific full rights on the directory
"%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"
The below configurations worked for me. Just replace the httpCompression section in applicationHost.config with the given below and restart IIS. That's it!!!
After configuring this, I got the below Headers in response which indicates that data is compressed using gzip compression
The above configuration is for the entire IIS. If you want to configure this for a single Website then replace
with
in applicationHost.config and instead of replacing the httpCompression section in applicationHost.config, add it under system.webServer tag in web.config of your Website
Also, make sure that you have specified correct MIME type for your data. In my case it was in JSON, so I used below configurations