1

Strangely I read tons of posts regarding the exact problem and many resolutions with it, but couldn't figure this out. So please read the following just to clarify what my problem is and what I have done so far to resolve the issue.

Problem : Unable to use dynamic compression for the xhr responses from my webservice hosted in an azure web role (instance has IIS 7.0), although javascript files (using mime type text/javascript) and aspx pages are properly loaded with gzip compression.

Environment : A medium azure instance running IIS 7.0

What I have tried and verified to resolve the issue

  • Make sure Azure CDN is disabled ( enabling azure cdn will disallow compression for xhr and this has to be resolved using different means. For instance by writing a custom web resource handler as explained here Azure CDN - Enabling HTTP Compression - Hosted Web Role ) (Done)
  • Make sure that the right applicationHost.config file is being targeted for editing if you're doing it manually. For instance on an IIS 7.0 running on 64-bit your applicationHost.config file would be located at %windir%\SYSWOW64\inetsrv\config and not in %windir%\System32\inetsrv\config folders. (Done)
  • Make sure dynamic compresion is enabled at IIS Server level and website level via IIS 7.0 (Done)
  • Verify that the applicationhost.config also has dynamic compression enabled. (Done)
  • Verify that appropriate mime types are used for compression. (Done) I have used the following mime types.
    • add mimeType="application/json" enabled="true"
    • add mimeType="application/json; charset=utf-8" enabled="true"
  • Verify that the size of the response meets the set threshold of the size of data that requires compression. (Done)
  • Recycle the application pool once the applicationhost.config file is edited for changes to httpCompression to take effect. (Done)
  • Verify that there's enough space on the directory where temporary files are created for compression. (Space available)
  • Verify that failed request logs do not show disabled compression errors. (No failed requests logged).

I guess the above ought to cover what I have tried and tested so far. Most people seem to have had issues related to the mime type but mine doesn't seem to be it.

Any suggestions or procedures that might help me sort this issue are welcome.

UPDATE : Added new step for verification. Please refer to step number 02 (Edited on 07/19/2012)

4

0 回答 0