18

I currently have both static and dynamic compression configured. The static compression is working, however the dynamic compression, when checked through YSlow and Fiddler, is not working.

In my applicationHost.config, I have the following settings:

<urlCompression doStaticCompression="true" doDynamicCompression="true"
    dynamicCompressionBeforeCache="true" />
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"
    maxDiskSpaceUsage="100" minFileSizeForComp="256">
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"
        dynamicCompressionLevel="1" />
    <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="*/*" enabled="true" />
    </dynamicTypes>
    <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="application/xaml+xml" enabled="true" />
        <add mimeType="*/*" enabled="true" />
    </staticTypes>
</httpCompression>
<serverRuntime frequentHitThreshold="1" frequentHitTimePeriod="01:00:00" />

My web.config has:

<urlCompression doStaticCompression="true"
    doDynamicCompression="true" dynamicCompressionBeforeCache="true" />

The modules are installed, and when I use the Failed Request Trace, I get a couple dynamic compression hits, but nothing about success or failure. Just these types of results:

ModuleName DynamicCompressionModule 
Notification 536870912 
fIsPostNotification false 
Notification SEND_RESPONSE 

ModuleName DynamicCompressionModule 
Notification 536870912 
fIsPostNotificationEvent false 
NotificationStatus 0 
Notification SEND_RESPONSE 
NotificationStatus NOTIFICATION_CONTINUE 

ModuleName DynamicCompressionModule 
Notification 256 
fIsPostNotification true  
Notification RELEASE_REQUEST_STATE 

ModuleName DynamicCompressionModule 
Notification 256 
fIsPostNotificationEvent true 
NotificationStatus 0 
Notification RELEASE_REQUEST_STATE 
NotificationStatus NOTIFICATION_CONTINUE 

I am trying to get my aspx files to compress. Any help would be appreciated. Thanks.

Ian Kemp
  • 28,293
  • 19
  • 112
  • 138
Justin Hof
  • 181
  • 1
  • 1
  • 4
  • I have the same problem. The request trace logs don't show anything happening in the DynamicCompressionModule sections, and there is nothing to indicate why they were skipped. – Josh Yeager Feb 28 '11 at 17:23
  • Have you tried using Failed Request Tracing ( http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/ ) it should show you the reason compression is not being done. – Carlos Aguilar Mares Feb 28 '11 at 18:56
  • Carlos, Justin's post includes the output of his Failed Request Trace files. Mine are nearly identical, as I said in my comment. – Josh Yeager Mar 01 '11 at 18:57
  • Please have a look at this post: stackoverflow.com/a/7634875/1131855 I was not able to edit applicationHost.config via Notepad++. This link suggested a console command which worked for me – Maxim Eliseev Nov 18 '14 at 17:00

2 Answers2

1

Are you sure you have Dynamic Compression installed in IIS? By default, it is not installed on Server 2008 (or R2). Try this article: http://www.iis.net/ConfigReference/system.webServer/urlCompression

tgolisch
  • 6,549
  • 3
  • 24
  • 42
1

Check this thread, it sounds like you are having a similar issue:

How can I get gzip compression in IIS7 working?

Community
  • 1
  • 1
Taylor Bird
  • 7,767
  • 1
  • 25
  • 31
  • In that thread, the guy enabled Failed Request Tracing, and the logs included error messages that told him what was wrong. In my case (and Justin's), the Failed Request logs don't show any actions being taken by the compressor. – Josh Yeager Mar 01 '11 at 18:59