httpCompression not work inside web.config
Asked Answered
D

1

5

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> 
Dalessio answered 7/3, 2018 at 14:59 Comment(3)
It is by design. Please upgrade to IIS 10.Vacillate
in IIS 10 we can change it in the web.config ?Dalessio
yes, IIS 10 supports that fully.Vacillate
V
6

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.

Vacillate answered 7/3, 2018 at 17:27 Comment(5)
I'm using IIS 10 and it still doesn't work, with <section name="httpCompression" allowDefinition="Everywhere" overrideModeDefault="Allow" />Caramelize
I'm trying to remove brotli like this: <clear /> <scheme name="gzip" dll="%ProgramFiles%\IIS\IIS Compression\iiszlib.dll" doStaticCompression="true" doDynamicCompression="true" staticCompressionLevel="10" dynamicCompressionLevel="10" /> but it still usesbrotli even after net stop was /y && net start w3svcCaramelize
@MaximMazurok that's not surprising, as the whole discussion (either here or in the Microsoft employee blog post) only covers basic elements like dynamicTypes. It is possible that overriding scheme in web.config is ignored by IIS.Vacillate
That makes sense... Could you please take a look at my question regarding this matter? #68267008Caramelize
@MaximMazurok yes, I saw that but I have nothing more to comment. You have to reach out to Microsoft.Vacillate

© 2022 - 2024 — McMap. All rights reserved.