title: Asp.net 4.0 web service compression
body: <p>I'm trying to gzip all requests and responses of a asp.net 4.0 web service hosted by IIS 7. </p>
  
  <p>Here is my client code:</p>
  
  <pre><code>XServiceReference.EndOfDayWebService client = new XServiceReference.EndOfDayWebService();
  client.EnableDecompression = true;
  client.CallMethod();
  </code></pre>
  
  <p>Is it enough to compress the requests? If the answer is yes, what method will be used for compression? gzip, deflate etc... If the answer is no what do I have to do additionally?</p>
  
  <p>In the server side, I did the configuration mentioned here: <a href="http://www.iis.net/ConfigReference/system.webServer/httpCompression" rel="nofollow">http://www.iis.net/ConfigReference/system.webServer/httpCompression</a></p>
  
  <p>I installed "Http Compression Dynamic" Windows feature and enabled dynamic content compression for the application containing the web service in IIS. Is it enough to compress the responses? If not what do I have to do?</p>