title: IIS Static Compression does not Gzip, or cache files
body: <p>I have an ASP.NET website that I'm trying to enable Static Compression for. My website has the following compression configuration.</p>
  
  <pre><code>&lt;httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" staticCompressionEnableCpuUsage="0" staticCompressionDisableCpuUsage="100" staticCompressionIgnoreHitFrequency="true"&gt;
    &lt;clear/&gt;
    &lt;scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="10" dynamicCompressionLevel="3" /&gt;
    &lt;scheme name="deflate" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="10" dynamicCompressionLevel="3" /&gt;
    &lt;staticTypes&gt;
      &lt;clear/&gt;
      &lt;add mimeType="text/*" enabled="true" /&gt;
      &lt;add mimeType="message/*" enabled="true" /&gt;
      &lt;add mimeType="application/x-javascript" enabled="true" /&gt;
      &lt;add mimeType="application/javascript" enabled="true" /&gt;
      &lt;add mimeType="*/*" enabled="false" /&gt;
    &lt;/staticTypes&gt;
  &lt;/httpCompression&gt;
  &lt;urlCompression doStaticCompression="true" doDynamicCompression="false"  dynamicCompressionBeforeCache="false" /&gt;
  </code></pre>
  
  <p>I do <em>not</em> want to enable dynamic compression. According to <a href="https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpcompression/" rel="nofollow noreferrer">Microsoft documentation</a>, </p>
  
  <blockquote>
    <p>Unlike static compression, IIS 7 performs dynamic compression each time a client requests the content, but the compressed version is not cached to disk.</p>
  </blockquote>
  
  <p>My web server is fairly heavily loaded with processes, so this would be an unwanted burden. By Static Compression is appealing because the compressed files are cached on disk.</p>
  
  <p>However, even after continuous refreshing of the localhost page (Ctrl+F5), and waiting 15+minutes on watching the compression directory, nothing is being cached.</p>
  
  <p>Also, none of the relevant files (css/js/html) are being returned with an gzip compression header.</p>
  
  <p>Both dynamic and static compression are installed. Dynamic is turned off. If I turn on dynamic compression, I start seeing the gzip HTTP response headers come back.</p>
  
  <p>What am I missing? Why does Static Compression refuse to work?</p>
  
  <p>IIS 10</p>