简体   繁体   English

IIS动态压缩失败

[英]IIS Dynamic Compression Failing

I'm trying to get Dynamic Compression on IIS 8.5 to work (particularly with JSON). 我试图让IIS 8.5上的动态压缩工作(特别是使用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. 我正在使用Windows Server 2012,IIS 8.5和一个非常简单的ASP.NET MVC站点,以JSON的形式返回ActionResult。 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. 首先,我已经完成了所有常用步骤,在服务器和站点级别的IIS中启用动态压缩,使用正确的MIME类型,频率等编辑了我的applicationHost.config。

I have enabled FailedRequestTrace logging, and what is strange is that my request is reporting a successful compression, however Chrome/Fiddlr disagree: 我启用了FailedRequestTrace日志记录,奇怪的是我的请求报告成功压缩,但Chrome / Fiddlr不同意:

在此输入图像描述

And the response in Trace logging contains the header "Content-Encoding: gzip": 跟踪日志记录中的响应包含标题“Content-Encoding:gzip”:

在此输入图像描述

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! 但Chrome / IE / Fiddlr中的响应不包含该标题,也没有压缩响应,看起来其他东西正在干扰! Please help! 请帮忙!

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来确定这一点),但是您看到浏览器中的响应已经缩小,那么在内容到达您的浏览器之前,可能会将您的防病毒解压缩

WireShark Wireshark的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM