How to enable gzip HTTP compression on Windows Azure dynamic content
- by Steven
Hi all,
I've been trying unsuccessfully to enable gzip HTTP compression on my Windows Azure hosted WCF Restful service which returns JSON only from GET and POST requests.
I have tried so many things that I would have a hard time listing all of them, and I now realise I have been working with conflicting information (regarding old version of azure etc) so think it best to start with a clean slate!
I am working with Visual Studio 2008, using the February 2010 tools for Visual Studio.
So, according to the following link, HTTP compression has now been enabled ..
http://msdn.microsoft.com/en-us/library/ff436045.aspx
... and I've used the advice at the following page (the URL compression advice only), but I get no compression.
http://blog.smarx.com/posts/iis-compression-in-windows-azure
<urlCompression doStaticCompression="true" doDynamicCompression="false" dynamicCompressionBeforeCache="true" />
It doesn't help that I don't know what the difference is between urlCompression and httpCompression. I've tried to find out but to no avail!
Could the fact that the tools for Visual Studio were released before the version of Azure which supports compression be a problem? I read somewhere that with the latest tools, you can choose which version of Azure OS you want to use when you publish ... but I don't know if that's true, and if it is, I can't find where to choose. Could I be using a pre-http enabled version?
I've also tried blowery http compression module, but no results.
Does any one have any up-to-date advice on how to achieve this? i.e. advice that relates to the current version of the Azure OS.
Cheers!
Steven