IIS 7.5 无静态或动态压缩
我无法在新服务器上对 .ASP、.JS 或 .CSS 文件进行静态或动态压缩。
我运行的是 Windows Server 2008 R2 Standard 64 位。在 IIS 角色服务下,我安装了 ASP,以及静态和动态压缩。我将 DefaultAppPool 与标准 ApplicationPoolIdentity 一起使用。我已启用该网站的所有压缩选项。
这是我的 applicationHost.config 的相关部分(全部位于 system.webServer 下):
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</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="false" />
</staticTypes>
</httpCompression>
<serverRuntime frequentHitThreshold="1" />
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
因此我打开了失败请求跟踪以获得更好的视图。
对于 ASP,它似乎完全跳过静态和动态压缩。没有 DYNAMIC_COMPRESSION_SUCCESS 或 DYNAMIC COMPRESSION_NOT_SUCCESS 条目。
对于 CSS 和 JS,它尝试静态压缩但失败:
STATIC_COMPRESSION_NOT_SUCCESS Reason="NO_MATCHING_SCHEME"
我在网上找不到任何关于 NO_MATCHING_SCHEME 含义的可靠文档。帮助!
I can't get static or dynamic compression to work on a new server for .ASP, .JS or .CSS files.
I'm running Windows Server 2008 R2 Standard 64 bit. Under IIS Role Services, I have ASP installed, as well as static and dynamic compression. I'm using DefaultAppPool with the standard ApplicationPoolIdentity. I've enabled all the compression options for the site.
Here's the relevant section of my applicationHost.config (this is all under system.webServer):
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</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="false" />
</staticTypes>
</httpCompression>
<serverRuntime frequentHitThreshold="1" />
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
So I turned on failed request tracing to get a better view.
For ASP, it appears to skip static and dynamic compression entirely. There is no entry for DYNAMIC_COMPRESSION_SUCCESS or DYNAMIC COMPRESSION_NOT_SUCCESS.
For CSS and JS, it attempts static compression but fails:
STATIC_COMPRESSION_NOT_SUCCESS Reason="NO_MATCHING_SCHEME"
I can't find any solid documentation online about what NO_MATCHING_SCHEME means. Help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能您已将应用程序池配置为使用经典模式:
system.webServer 部分中的一些设置仅适用于 IIS 7.0 集成模式,不适用于经典模式。
尝试通过 IIS 管理器 UI。
Probably you have application pool configured to use Classic mode:
Some settings in the system.webServer section apply only to IIS 7.0 Integrated mode and do not apply to Classic mode.
Try to set up compression via IIS Manager UI.