Skip to content

system.webServer/httpCompression settings don't apply after the first tune #43

@NemoDima

Description

@NemoDima

system.webServer/httpCompression settings don't apply after the first tune.
I want to change the dynamic compression level, but the new setting doesn't influence the final size of the transferred data.
изображение

Environment:
WinOS 2016 ver1607
IIS 10.0.14393.0
additionally installed https://download.microsoft.com/download/6/1/C/61CC0718-ED0E-4351-BC54-46495EBF5CC3/iiscompression_amd64.msi

I have added site, downloaded mentioned msi-package, enabled static and dynamic compression, setting up the level of compression, added types (application/json and application/json; charset=utf-8), add URLrewrite rule for the brotli.

After this action, brotli compression applying for the site successfully, but if I want to change or disable the compression it doesn't work. It looks like system.webServer/httpCompression doesn't work at all. I noticed that web.config changed but settings don't influence it all.

изображение

изображение

изображение

изображение

Only compression section works and provides the ability to disable compression
изображение

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!-- To customize the asp.net core module uncomment and edit the following section. 
  For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
  <system.webServer>
    <modules>
      <remove name="WebDAVModule" />
    </modules>
    <handlers>
      <remove name="WebDAV" />
      <remove name="aspNetCore" />
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\GoodStreamWebSpa_BigClients.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" requestTimeout="01:00:00" />
        <httpCompression>
            <remove name="gzip" />
            <remove name="br" />
            <scheme name="br" doDynamicCompression="true" dll="%ProgramFiles%\IIS\IIS Compression\iisbrotli.dll" dynamicCompressionLevel="2" />
            <scheme name="gzip" doStaticCompression="true" doDynamicCompression="true" dll="%ProgramFiles%\IIS\IIS Compression\iiszlib.dll" dynamicCompressionLevel="9" />
            <dynamicTypes>
                <add mimeType="application/json" enabled="true" />
                <add mimeType="application/json; charset=utf-8" enabled="true" />
            </dynamicTypes>
            <staticTypes>
                <add mimeType="application/json" enabled="true" />
                <add mimeType="application/json; charset=utf-8" enabled="true" />
            </staticTypes>
        </httpCompression>
        <rewrite>
            <rules>
                <rule name="Prioritize Brotli">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_ACCEPT_ENCODING}" pattern="\bbr(?!;q=0)\b" />
                    </conditions>
                    <serverVariables>
                        <set name="HTTP_ACCEPT_ENCODING" value="br" />
                    </serverVariables>
                    <action type="None" />
                </rule>
            </rules>
        </rewrite>
        <urlCompression doDynamicCompression="true" />
  </system.webServer>
</configuration>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions