I have compression enabled within IIS7 and it works as expected on all responses except for those constructed by ASP.NET AJAX. I have a web service that provides data to the cl
IIS7 uses the content-encoding to decide whether to compress the response (assuming of course that the browser can accept gzip). They're set in applicationHost.config, and by default the list is
If you call the web service directly, the XML response has a content-type of text/xml
, which gets compressed. When called by AJAX, the JSON response has a content type of application/json
, so it isn't compressed. Adding the following to applicationHost.config should fix that...