I had to enable the request compression for an ASP.NET 2.0 Web Service (no Web Service Enhancements for that client.. ), so here is my solution: I created a CompressionSoapExtension attribute. This attribute was added to the web service methods (for the web service and the web service proxy). Plus, on the client side we added the line:
Here is the code for the attribute:
And here is the main class: