日期:2014-05-17  浏览次数:21339 次

异常详细信息: System.Xml.XmlException: 根级别上的数据无效。 第 1 行,位置 1。
从客户端向wcf服务器提交数据时,如果数据长度大于8192byte就抛出这个异常,已经将客户端和服务器端的配置设置为如下这个样子,可是依然报错。
客户端

<system.serviceModel>
    <bindings>
      <customBinding>        
        <binding name="CustomBinding_IRemittanceBasicDataService" >
          <binaryMessageEncoding>
            <readerQuotas maxStringContentLength="2147483647"/>
          </binaryMessageEncoding>
          <httpTransport realm="" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"/>
        </binding>        
      </customBinding>
    </bindings>
    <client>      
      <endpoint address="http://server11/remittance_trunk_test/ManagerService/RemittanceBasicDataService.svc"
          binding="customBinding" bindingConfiguration="CustomBinding_IRemittanceBasicDataService"
          contract="RemittanceBasicDataService.IRemittanceBasicDataService"
          name="CustomBinding_IRemittanceBasicDataService"/>      
    </client>
  </system.serviceModel>

服务器端配置:


<system.serviceModel>
    <services>      
      <service name="EgoalTech.Remittance.ManagerService.RemittanceBasicDataService">
        <endpoint address="" binding="customBinding" bindingConfiguration="SslCustomBinding"
          contract="EgoalTech.Remittance.ManagerService.IRemittanceBasicDataService" />
        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
          contract="IMetadataExchange" />
      </service>     
      </service>
    </services>
    <bindings>
      <customBinding>
        <binding name="SslCustomBinding">
          <binaryMessageEncoding maxWritePoolSize="2147483647" maxReadPoolSize="2147483647" maxSessionSize="2147483647"/>
          <httpTransport maxReceivedMessageSize="2147483647" />
        </binding>
      </customBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior&g