Note that there are some explanatory texts on larger screens.

plurals
  1. POJson HTTP-Compression With Gzip In IIS8
    primarykey
    data
    text
    <p>Ok, I've been reading for hours about this. Dozens of SO posts and blogs, etc. No answer to be found. </p> <p>Goal: enable dynamic http compression of json response from my WCF service.</p> <p>Note: gzip already works for static content and for dynamic content when applicationhost.config contains the following:</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="text/*" enabled="true" /&gt; &lt;add mimeType="message/*" enabled="true" /&gt; &lt;add mimeType="application/x-javascript" enabled="true" /&gt; &lt;add mimeType="application/json; charset=utf-8" enabled="true" /&gt; &lt;add mimeType="*/*" enabled="false" /&gt; &lt;/dynamicTypes&gt; &lt;staticTypes&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/atom+xml" enabled="true" /&gt; &lt;add mimeType="application/xaml+xml" enabled="true" /&gt; &lt;add mimeType="*/*" enabled="false" /&gt; &lt;/staticTypes&gt; &lt;/httpCompression&gt; &lt;/system.webServer&gt; </code></pre> <p>Unfortunately on the server I'm using the following line is missing from applicationhost.config:</p> <pre><code>&lt;add mimeType="application/json; charset=utf-8" enabled="true" /&gt; </code></pre> <p>And I cannot add it manually because the server is an AWS EC2 instance launched by Elastic Beanstalk (as such I could change it on one instance but not on all instances whenever they are launched).</p> <p>Also unfortunately, the applicationhost.config includes this line:</p> <pre><code>&lt;section name="httpCompression" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /&gt; </code></pre> <p>Which means that I cannot override the httpCompression section in my app's web.config.</p> <p>My question: are there other approaches to enabling gzip compression of dynamic content that I should try?</p> <p>If overrideModeDefault="Allow" would I then be able to place the httpCompression section in my app's web.config and expect it to override?</p> <p>Happy to add further clarification if needed.</p> <p>Cheers</p>
    singulars
    1. This table or related slice is empty.
    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