Dynamic compression doesn't seem to be used in IIS 7.5
Asked Answered
I

2

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.

Interact answered 11/1, 2011 at 21:16 Comment(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.Flinn
Have you tried using Failed Request Tracing ( learn.iis.net/page.aspx/266/… ) it should show you the reason compression is not being done.Twentytwo
Carlos, Justin's post includes the output of his Failed Request Trace files. Mine are nearly identical, as I said in my comment.Flinn
Please have a look at this post: https://mcmap.net/q/742555/-compressing-a-web-service-response-for-jquery I was not able to edit applicationHost.config via Notepad++. This link suggested a console command which worked for meAloke
N
1

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

How can I get gzip compression in IIS7 working?

Nashoma answered 28/2, 2011 at 19:52 Comment(1)
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.Flinn
N
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

Norbert answered 26/7, 2012 at 17:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.