发送GZIP通过WCF将请求压缩到Web服务

时间:2016-01-30 11:56:23

标签: c# xml web-services wcf soap

这里有类似的问题 GZIP compress the request to a remote web service via WCF 当我实施专家提供的解决方案时 即WCF客户端端点压缩

这是我的web.config文件代码

<bindings>
  <customBinding>
    <binding name="NAME" >
      <binaryMessageEncoding compressionFormat="GZip"/>
      <httpsTransport/>
    </binding>
  </customBinding>
</bindings>
<client>
  <endpoint address="MYENDPOINTURL"
      binding="customBinding"    bindingConfiguration="NAME"
      contract="ICONTRACT"  name="BulkRequestTransmitterPort" />
</client>

下面是我得到的错误

  

错误:响应消息的内容类型text / xml; charset = utf-8与绑定的内容类型(application / soap + msbin1 + gzip)不匹配。如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法。响应的前807个字节是:&#39;                                 soapenv:客户端               必须使用HTTP压缩(RFC 1952 - GZIP)发送请求消息。                                 TPE1112                                                       &#39;

有人可以告诉我我做错了吗?``

由于

0 个答案:

没有答案
相关问题