Apparently when building a web service under .NET 4.0, this heading is automatically added with gzip, deflate.

See "WCF Adding AcceptEncoding Header after Framework Upgrade from 3.5 to 4.0" at
 
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/bad614e9-9bf1-4062-b0b5-e5beba4539b5/

I found if you build against .Net 3.5 this heading was not added. So that is one way out.

If you need .NET 4.0 then you can turn it off, see http://msdn.microsoft.com/en-us/library/dd456789.aspx

   <snip>
   By default, a WCF client sends an *Accept-Encoding*header to the
   server to notify that it can decompress data.
   This default behavior can be turned off by creating a custom binding
   based on the HttpTransportBindingElement
   <http://msdn.microsoft.com/en-us/library/aa751804.aspx> and setting
   the DecompressionEnabled
   
<http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.httptransportbindingelement.decompressionenabled.aspx>
   property to *false*.
   </snip>


However in my test application, I still get a null returned from my client proxy.method call. The Accept-Encoding probably had nothing to do with my problem.

Interesting, neither of two geocoder c# demo applications I downloaded from web work either (they both get a null returned from their client proxy method call as well. It must be something else. I will investigate this later after I have learnt some more.

Regards Peter

















Reply via email to