Ich kann einfach nicht GZIP-Komprimierung für meine ASP.NET 4-Anwendung aktivieren. Nur Javascript-Dateien scheinen komprimiert zu werden. Die Seite, CSS und andere werden nicht komprimiert.IIS 7.5 ASP.NET-4 Gzip-Komprimierung
Die Antwort-Header eines nicht komprimierten CSS-Datei ist:
Content-Type text/css
Last-Modified Mon, 09 Aug 2010 20:10:34 GMT
Accept-Ranges bytes
Etag "5d71bdecfe37cb1:0"
Server Microsoft-IIS/7.5
Date Sat, 28 Aug 2010 14:33:56 GMT
Content-Length 3364
Und für eine Javascript-Datei, die komprimiert wird (ScriptResource.axd):
Cache-Control public
Content-Type application/x-javascript
Content-Encoding gzip
Expires Sun, 28 Aug 2011 14:33:50 GMT
Last-Modified Sat, 28 Aug 2010 14:33:50 GMT
Server Microsoft-IIS/7.5
Date Sat, 28 Aug 2010 14:33:56 GMT
Content-Length 478
In applicationHost.config:
<httpCompression sendCacheHeaders="false" directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" noCompressionForRange="true">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<staticTypes>
</staticTypes>
<dynamicTypes>
</dynamicTypes>
</httpCompression>
Und in der App web.config:
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
<httpCompression noCompressionForRange="false" noCompressionForHttp10="false" noCompressionForProxies="false" >
<dynamicTypes>
<add mimeType="text/css" enabled="true" />
</dynamicTypes>
<staticTypes>
<add mimeType="text/css" enabled="true" />
</staticTypes>
</httpCompression>
Kann mir jemand sagen, welche Einstellung ich vermisse?
Sie müssen dies auch tun: http://StackOverflow.com/a/15626981/176877 –