IIS 7.5 中似乎没有使用动态压缩

发布于 2024-10-11 08:54:29 字数 2322 浏览 3 评论 0原文

我目前配置了静态和动态压缩。静态压缩正在工作,但是,通过 YSlow 和 Fiddler 检查时,动态压缩不起作用。

在我的 applicationHost.config 中,我有以下设置:

<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" />

我的 web.config 有:

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

模块已安装,当我使用失败的请求跟踪时,我得到了一些动态压缩命中,但没有关于成功或失败的信息。只是这些类型的结果:

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 

我正在尝试压缩我的 aspx 文件。任何帮助将不胜感激。谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月亮坠入山谷 2024-10-18 08:54:29

检查此线程,听起来您遇到了类似的问题:

如何在 IIS7 中使用 gzip 压缩?

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

How can I get gzip compression in IIS7 working?

意中人 2024-10-18 08:54:29

您确定在 IIS 中安装了动态压缩吗?默认情况下,它未安装在 Server 2008(或 R2)上。试试这篇文章: http://www.iis.net/ConfigReference/system.webServer/urlCompression

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文