【发布时间】:2010-01-27 06:21:34
【问题描述】:
我已插入 HttpCompress 模块,为我的 MVC Web 应用程序启用压缩。
如果我通过开发 Web 服务器 (Cassini) 运行我的网站,则执行压缩不会有任何问题。
但是,当我将站点部署到 IIS6 时,压缩并未执行。我检查了压缩库的源代码,并且 CompressContent 处理程序返回而不采取任何行动,因为
存在空值app.Request.Headers["Accept-Encoding"]
我最好的猜测是,这与 IIS6 中无扩展 url 的处理有关。我需要做些什么来解决生产中的这个问题?
[下面是模块的配置,如果有帮助的话]
<blowery.web>
<httpCompress preferredAlgorithm="deflate" compressionLevel="high">
<excludedMimeTypes>
<add type="image/jpeg" />
<add type="image/png" />
<add type="image/gif" />
<add type="application/pdf" />
</excludedMimeTypes>
<excludedPaths></excludedPaths>
</httpCompress>
</blowery.web>
【问题讨论】:
标签: asp.net-mvc iis-6 compression gzip deflate