I have seen posts with GZIP compression not working on IIS7, but none seemed to help in my case. I have a proxy server that sends the request to my website on IIS7. I have the following in web.config to enable compression:

 <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
    <httpCompression cacheControlHeader="max-age=86400" noCompressionForHttp10="false" noCompressionForProxies="false" sendCacheHeaders="true" />

Note the noCompressionForProxies="false" I have also updated the httpCompression tag in C:\Windows\System32\inetsrv\config\applicationHost.config On enabling Failed Request Tracing in IIS7, I see the following reason for failure:


The request in the log shows as:

Headers="Connection: keep-alive
Via: 1.1 www.<<website>>.com (Access Gateway 3.1.3-<<SpecificVersion>>-     )
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Cookie: ASP.NET_SessionId=efm3mrq3vdnh4k55fjthm245
Host: <<Server>>
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Ua-Cpu: x86

The server is Windows Standard Server SP2. I am running out of ideas here. Is there something more I should try?

migrated from stackoverflow.com May 19 '11 at 14:44

This question came from our site for professional and enthusiast programmers.


It turns out that I had to restart IIS for the above setting to take effect. It is not very often that I have needed to restart IIS when changing a config file. A new lesson everyday.

  • Oh, and the code<httpCompression cacheControlHeader="max-age=86400" noCompressionForHttp10="false" noCompressionForProxies="false" sendCacheHeaders="true" />code didn't work, I had to add it to the applicationHost.config in C:\windows\system32\inetsrv\config folder – Praveen Nayak May 20 '11 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy