当前位置: 代码迷 >> Web Service >> WCF pos 数据 报400异常
  详细解决方案

WCF pos 数据 报400异常

热度:514   发布时间:2016-05-02 02:35:56.0
求助 WCF pos 数据 报400错误
WCF  客户端 pos数据 如果超过一定数量的话 会报400 错误,貌似是配置的问题,但是已经修改了服务器端和客户端的配置

报错信息如下: 远程服务器返回了意外响应: (400) Bad Request。

服务器端提示是序列化超过了65545字节的意思,
wcf 客户端,服务器端配置文件如下:
    <bindings>
       
      <basicHttpBinding>
        <binding name='basicHttpBindingConfig' maxBufferSize='2147483647'
          maxBufferPoolSize='2147483647' maxReceivedMessageSize='2147483647'
          messageEncoding='Mtom' transferMode='Streamed'>
          <readerQuotas maxDepth='2147483647'
                        maxStringContentLength='2147483647'
                         maxArrayLength='2147483647'
                         maxBytesPerRead='2147483647'
                         maxNameTableCharCount='2147483647'/>
        </binding>
      </basicHttpBinding>
     
    </bindings>


还有已经设置
<system.web>
    <compilation debug='true' />
    <httpRuntime maxRequestLength='2097151'/>
  </system.web>
WCF?400

------解决方案--------------------
还是配置的问题,好好看看相关的其他属性,同时需要注意保证客户端和服务端配置项的一致性。
------解决方案--------------------
http://blog.csdn.net/fangxinggood/article/details/6031072
  相关解决方案