views:

70

answers:

0

I'm trying to play with my IIS7 compression settings in my web.config file. I'm trying to enable HTTP 1.0 requests to be gzip.

MSDN has all the info about it here.

Is it possible to have this config info in my own website's web.config file? Or do i need to set it at an application level? Currently, I have that code in my web.config...

<system.webServer>
    <urlCompression 
        doDynamicCompression="true" 
        dynamicCompressionBeforeCache="true" />
    <httpCompression 
        cacheControlHeader="max-age=86400" 
        noCompressionForHttp10="False" 
        noCompressionForProxies="False" 
        sendCacheHeaders="true" />

    ... other stuff snipped ...

</system.webServer>

It's not working :( HTTP 1.1 requests are getting compressed, just not 1.0.

That MSDN page above says that it can be used in :-

  • Machine.config
  • ApplicationHost.config
  • Root application Web.config
  • Application Web.config
  • Directory Web.config

So, can we set these settings on a per-website-basis, programatically in a web.config file? What have i done wrong?