httpCompression override in web.config ASP.NET IIS7.5
Asked Answered
G

0

9

I have this code in my web.config for an ASP.NET 4.5 website running in IIS 7.5

<system.webServer>
  <urlCompression doStaticCompression="true" doDynamicCompression="true"
  dynamicCompressionBeforeCache="true" />
  <httpCompression>
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" 
    staticCompressionLevel="9" dynamicCompressionLevel="4"  />
  </httpCompression>
</system.webServer>

(I forced a new line for better reading)

I'm wondering if having an empty (without directory="..." and other internal elements like and such) will cause issue or the default attributes/elements for this section are correctly read from IIS applicationHost.config

What I'm trying to do here is just set the compression on and the compression ratio in the web.config without overriding or clearing other default values. Could I remove name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" from the scheme as well in the web.config and just leave staticCompressionLevel and dynamicCompressionLevel in the scheme tag? Would those attributes be read from applicationHost.config

Goody answered 17/12, 2012 at 15:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.