I'm trying to implement Gzip compression in a WCF Service that is hosted on IIS.
Previously the binding config was set as --
<customBinding> <binding name="SOAPBinding"> <textMessageEncoding messageVersion="Soap11WSAddressing10" /> </binding> </customBinding> Now to implement compression, I'm changing the binding config to --
<customBinding> <binding name="SOAPBinding"> <binaryMessageEncoding compressionFormat="GZip" /> </binding> </customBinding> Once I make the changes, whenever I'm trying to get the response for the endpoint (testing using SOAP UI), it returning error response as
Cannot process the message because the content type 'application/soap+xml;charset=UTF-8 was not the expected type 'application/soap+msbin1+gzip'.
With the previous binding config, the service is working fine. Once I'm changing the custom Binding it is throwing the error.
Expectation is when the Accept-Encoding : gzip, is sent in the request the service should return the response with header Content-Encoding : gzip, once the compression is enabled