所以,我有点像 IIS7 n00b,但我已经使用了大部分旧的 IIS 系统,可以追溯到 3。我正在尝试打开动态压缩,并且它正在工作,主要是。它不适用于我的 ADO.Net 数据服务 (Astoria) 请求,无论是否批处理。
我发现失败的请求 (FREB) 跟踪非常有用。我在非批处理请求中看到的是Reason Code 12, NO_MATCHING_CONTENT_TYPE
. 好的,所以我没有指定匹配的 MIME 类型,这很简单。
除了这是我在 web.config 中的内容(我认为这是正确的,但也许不是)。
<httpCompression dynamicCompressionDisableCpuUsage="100"
dynamicCompressionEnableCpuUsage="100"
noCompressionForHttp10="false"
noCompressionForProxies="false"
noCompressionForRange="false"
sendCacheHeaders="true"
staticCompressionDisableCpuUsage="100"
staticCompressionEnableCpuUsage="100">
<dynamicTypes>
<clear/>
<add mimeType="*/*"
enabled="true" />
</dynamicTypes>
<staticTypes>
<clear/>
<add mimeType="*/*"
enabled="true" />
</staticTypes>
</httpCompression>
<urlCompression doDynamicCompression="true"
doStaticCompression="true"
dynamicCompressionBeforeCache="false" />
Run Code Online (Sandbox Code Playgroud)
现在我认为这意味着它应该压缩任何包含 Accept:Gzip 标头的请求。我很想知道其他人在这里会怎么想。
我的小提琴手踪迹:
GET /SecurityDataService.svc/GetCurrentAccount HTTP/1.1
Accept-Charset: UTF-8
Accept-Language: en-us
dataserviceversion: 1.0;Silverlight
Accept: application/atom+xml,application/xml
maxdataserviceversion: 1.0;Silverlight
Referer: http://sdev03/apptestpage.aspx
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; …
Run Code Online (Sandbox Code Playgroud)