title: Enabling gzip compression on Azure App Service
body: <p>I have a web app hosted in microsoft azure. As local IIS uses compression for both static and dynamic content I expected this to work on azure platform as well. As it seems compression does not work as json and css files for example are returned uncompressed:</p>
  
  <p><a href="https://i.stack.imgur.com/QqwQD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QqwQD.png" alt="Request header"></a> </p>
  
  <p><a href="https://i.stack.imgur.com/Ylenb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ylenb.png" alt="Response header"></a></p>
  
  <p>I have tried to set compression as mentioned in serveral posts (e.g. <a href="https://stackoverflow.com/questions/14722464/gzip-compression-in-windows-azure-websites">gzip compression in Windows Azure Websites</a> or ) like this without any changes to the result:</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;urlCompression doStaticCompression="true" doDynamicCompression="true" /&gt;
    &lt;httpCompression&gt;
      &lt;dynamicTypes&gt;
      &lt;clear /&gt;
      &lt;add enabled="true" mimeType="text/*"/&gt;
      &lt;add enabled="true" mimeType="message/*"/&gt;
      &lt;add enabled="true" mimeType="application/x-javascript"/&gt;
      &lt;add enabled="true" mimeType="application/javascript"/&gt;
      &lt;add enabled="true" mimeType="application/json"/&gt;
      &lt;add enabled="false" mimeType="*/*"/&gt;
      &lt;add enabled="true" mimeType="application/atom+xml"/&gt;
      &lt;add enabled="true" mimeType="application/atom+xml;charset=utf-8"/&gt;
    &lt;/dynamicTypes&gt;
    &lt;staticTypes&gt;
      &lt;clear /&gt;
      &lt;add enabled="true" mimeType="text/*"/&gt;
      &lt;add enabled="true" mimeType="message/*"/&gt;
      &lt;add enabled="true" mimeType="application/javascript"/&gt;
      &lt;add enabled="true" mimeType="application/atom+xml"/&gt;
      &lt;add enabled="true" mimeType="application/xaml+xml"/&gt;
      &lt;add enabled="true" mimeType="application/json"/&gt;
      &lt;add enabled="false" mimeType="*/*"/&gt;
    &lt;/staticTypes&gt;
   &lt;/httpCompression&gt;
  [...]
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>As it seems the azure portal does not give me any option to change compression. </p>
  
  <p>What do I need to do to enable compression or is it only possible when using a Vserver in azure?</p>