Last post Feb 03, 2015 01:14 AM by Eileen ni - MSFT
Jan 29, 2015 09:10 AM|carsten-p|LINK
I have been using/enabling GZip compression for dynamic and static content in web.config for ages. Today i used the usual concept (check below - mvc 5.2.2), and i saw that GZip/Deflate wouldn't activate. I checked my existing sites running on IIS 8.5 Windows
Server 2012 R2 (fully updated) in production. None of these sites was using GZip. Instead the "Content-Length" header is missing, and "Transfer-Encoding: chunked" is used instead.
I've search everywhere. Checked iis.net, stackoverflow, google etc. No information about this problem. I've checked the applicationHost.config, and the nodes may be overwritten.
Even my local IISExpress wont return GZip, but Transfer-Encoding: chunked instead. Expiration is added correctly on static content.
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="false" />
<add mimeType="application/json" enabled="true" />
<add mimeType="application/json; charset=utf-8" enabled="true" />
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365:00:00" />
<remove fileExtension=".js" />
Production server: Win Srv 2012 R2 - Fully patched/updated. .NET 4.5(.1)
Local: Win 8.1 .NET 4.5(.1)
I've checked other sites, which i know was using GZip (ex. madskristensen.net) until recently. It seams like it has the same problem.
Anyone know why this happens ?
Thanks in advance
Feb 03, 2015 01:14 AM|Eileen ni - MSFT|LINK
Thanks for your post.
please check these references:
Transfer-Encoding: gzip vs. Content-Encoding: gzip
Chunked transfer encoding
HTTP/1.1 chunked and gzip (hard!)
Maybe it will help you.