The bindings have to be exactly the same on the client and the server. The key thing that happens when setting decompressionEnabled="false"
is that it stops setting the Accept-Encoding
header to "gzip,deflate". Great stuff.
As far as I understand, the service wouldnt even need to have this configuration, because it will respond with gzipped content even when configured with decompressionEnabled="false"
when a client sends the accept-encoding=gzip
.
Full working client:
<bindings>
<customBinding>
<binding name="test">
<textMessageEncoding messageVersion="Soap11" writeEncoding="utf-8"></textMessageEncoding>
<httpTransport decompressionEnabled="false"></httpTransport>
</binding>
</customBinding>
</bindings>
<protocolMapping>
<add binding="customBinding" bindingConfiguration="test" scheme="http" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<client>
<endpoint address="http://localhost:5555/Service1.svc"
binding="customBinding" bindingConfiguration="test"
contract="IService1"
name="WebServiceEndpoint" />
</client>
Full service:
<bindings>
<customBinding>
<binding name="test">
<textMessageEncoding messageVersion="Soap11" writeEncoding="utf-8"></textMessageEncoding>
<httpTransport decompressionEnabled="false"></httpTransport>
</binding>
</customBinding>
</bindings>
<protocolMapping>
<add binding="customBinding" bindingConfiguration="test" scheme="http" />
</protocolMapping>