I'm trying to enable compression of a JSON response sent by Web API controller, but for some reason, it does not work.
I have went through many similar questions on StackOverflow and Microsoft forums. So the Dynamic compression module is installed, the httpCompression
in applicationHost.config
is the following:
As you can, see I have raised the dynamicCompressionDisableCpuUsage
and dynamicCompressionEnableCpuUsage
values.
I have also set urlCompression
to the following value in both applicationHost
and web.config
to:
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
The Failed Request Tracing (like described here: https://stackoverflow.com/a/787251/829623) shows some hits for static compression, but nothing for dynamic compression.
The response sizes are varying from 800 KBs to 20 MBs. But none of them are compressed.
The problem here is that my local IIS 8 server with the same configuration compresses everything, and I've just run out of ideas why the issue happens. Maybe the problem is in CPU usage? Is it possible to check it? Other than this, I don't have any assumptions unfortunately.