问题
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