httpCompression not work inside web.config

走远了吗. 提交于 2019-12-11 01:11:34

问题


Is their anyway to make httpCompression work from inside web.config ?

i try to add this in my web.config but it's does nothing :

<httpCompression>
  <dynamicTypes>
    <clear />
    <add mimeType="text/*" enabled="true" />
    <add mimeType="application/json" enabled="true" />    
    <add mimeType="application/javascript" enabled="true" />
    <add mimeType="*/*" enabled="false" />
  </dynamicTypes>
  <staticTypes>
    <clear />
    <add mimeType="text/*" enabled="true" />
    <add mimeType="application/javascript" enabled="true" />
    <add mimeType="*/*" enabled="false" />
  </staticTypes>
</httpCompression> 

回答1:


Overriding compression related settings in web.config is considered a new addition in IIS 10,

https://blogs.msdn.microsoft.com/friis/2017/09/05/iis-dynamic-compression-and-new-dynamic-compression-features-in-iis-10/

So to answer your question, you have to upgrade to IIS 10.



来源:https://stackoverflow.com/questions/49154954/httpcompression-not-work-inside-web-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!