Note that there are some explanatory texts on larger screens.

plurals
  1. POIIS 7.5 not compressing JSON when set in application web.config
    primarykey
    data
    text
    <p>I've been working on enabling JSON compression from one of our MVC3 sites. From various articles I've read it seems as though I should be able to set the <code>application/json; charset=utf-8</code> MIME type in the applications web.config file. But doing so does not enable compression. But when added to the applicationhost.config file, it works. Am I missing something here?</p> <p>My application web.config has the following added to it:</p> <pre><code>&lt;httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"&gt; &lt;scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /&gt; &lt;dynamicTypes&gt; &lt;add mimeType="application/javascript; charset=utf-8" enabled="true" /&gt; &lt;add mimeType="application/x-javascript" enabled="true" /&gt; &lt;add mimeType="application/json" enabled="true" /&gt; &lt;add mimeType="application/json; charset=utf-8" enabled="true" /&gt; &lt;/dynamicTypes&gt; &lt;staticTypes&gt; &lt;add mimeType="application/javascript; charset=utf-8" enabled="true" /&gt; &lt;add mimeType="application/x-javascript" enabled="true" /&gt; &lt;add mimeType="application/json" enabled="true" /&gt; &lt;add mimeType="application/json; charset=utf-8" enabled="true" /&gt; &lt;/staticTypes&gt; &lt;/httpCompression&gt; &lt;urlCompression doStaticCompression="true" doDynamicCompression="true" /&gt; </code></pre> <p>The server is running Windows Server 2008 R2 with IIS7.5. I've also installed &amp; enabled Dynamic Compression for the site in question.</p> <p>Any help would be greatly appreciated, as I do not wish to enable JSON compression for the entire server.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload