IIS动态压缩失败 [英] IIS Dynamic Compression Failing

查看:239
本文介绍了IIS动态压缩失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在IIS 8.5上运行动态压缩(尤其是使用JSON)。我正在使用Windows Server 2012,IIS 8.5和一个非常简单的ASP.NET MVC站点,以JSON的形式返回ActionResult。首先,我已经完成了所有常规步骤,在服务器和站点级别的IIS中启用动态压缩,使用正确的MIME类型,频率等编辑我的applicationHost.config。

I'm trying to get Dynamic Compression on IIS 8.5 to work (particularly with JSON). I'm using Windows Server 2012, IIS 8.5 and a very simple ASP.NET MVC site returning an ActionResult in the form of JSON. Firstly I have done all the usual steps, enabling Dynamic Compression in IIS at the server and site level, edited my applicationHost.config with the correct MIME types, frequency etc.

我启用了FailedRequestTrace日志记录,奇怪的是我的请求报告成功压缩,但Chrome / Fiddlr不同意:

I have enabled FailedRequestTrace logging, and what is strange is that my request is reporting a successful compression, however Chrome/Fiddlr disagree:

Trace记录中的响应包含标题Content-Encoding:gzip:

And the response in Trace logging contains the header "Content-Encoding: gzip":

但Chrome / IE / Fiddlr中的响应不包含该标题,也没有压缩响应,它会出现其他东西在干扰!请帮助!

But the response in Chrome/IE/Fiddlr does not contain that header nor is the response compressed, it would appear that something else is interfering! Please help!

推荐答案

如果服务器正在提供压缩响应(使用WireShark确定这一点),但您看到响应已缩小在浏览器中,可能是在内容到达浏览器之前将您的防病毒解压缩

If the server is serving the response zipped (use WireShark to determine this) but you are seeing the response deflated in the browser it's likely to be your antivirus unzipping before the content gets to your browser

WireShark

这篇关于IIS动态压缩失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆