I would like to compress the data coming out of WCF on a basicHttpBinding.
I am trying to produce a new version of a system originally written as SOAP web services. In that we returned a GZipStream when we received a request.
Is there any way to do the same with WCF?
I am using VS2010, currently against .Net 3.5 but that’s flexible.
Thanks
If you plan to use IIS hosting and .NET 4.0 client you can use build in dynamic content compression in IIS. If client sends Accept-Encoding: gzip/deflate header to the service IIS will compresses the response for you. .NET 4.0 client is able to automatically decompress the response. Check Support for HTTP Decompression section.