Enable Compression Mime-types for Web-Site Application
<p>Our website uses both dynamic and static compression. I know that compression can be enabled/disabled on a web.config level, but that the mime-types for static and dynamic compression cannot be enabled at a web-config level. </p>

<p>Meaning, this section:</p>

<pre><code>&lt;httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" staticCompressionIgnoreHitFrequency="true"&gt;
    &lt;scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /&gt;
    &lt;staticTypes&gt;
        Stuff
    &lt;/staticTypes&gt;
    &lt;dynamicTypes&gt;
        Stuff
    &lt;/dynamicTypes&gt;
&lt;/httpCompression&gt;
</code></pre>

<p>Must go in the applicationHost.config, and is generally edited using appcmd.exe. </p>

<p>I know there is a <code>location</code> element in the applicationHost.config that allows setting many things on a per website basis, but I can't seem to find anywhere if mimetypes for dynamic compression are one of them.</p>

<p>I have tried overriding these settings using a location element, but have not had any success and cannot find documentation stating it's possible for the <code>httpCompression</code> element.</p>

<p>To make matters worse, we install our product as a web application under the default site, so really we want to enable these dynamic compression mime-types only under our application, instead of site (or server) wide. Is this possible?</p>

<p>Generally, we are using IIS 7 and above. Right now our minimum is 7, so assume anything needs to work with that.</p>

<p>My question is: </p>

<p>Can <code>httpCompression</code> settings be set in the applicationHost.config per website and possible per web application under a web site? </p>

<p>Is there a different way to enable dynamicCompression specifics on a website/web application level?</p>