客户端调用 Webservice 报错 当数据量很大的时候

MaxItemsInObjectGraph - System.ServiceModel.Dispatcher.NetDispatcherFaultException

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="CustomBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="DefaultQueryEndpoint" closeTimeout="00:10:00"
            openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
            allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="65536000" maxBufferPoolSize="52428800" maxReceivedMessageSize="65536000"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="1638400"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://xxx/xxxServiceReference.svc"
          binding="basicHttpBinding" bindingConfiguration="DefaultQueryEndpoint"
          contract="xxxService.xxxQuery" name="DefaultQueryEndpoint"
          behaviorConfiguration="CustomBehavior"
        />
    </client>
  </system.serviceModel>
</configuration>

posted @ 2013-05-07 16:55  在 水 一 方  阅读(864)  评论(0编辑  收藏  举报