zoukankan      html  css  js  c++  java
  • 客户端调用 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>

  • 相关阅读:
    #Leetcode# 164. Maximum Gap
    #Leetcode# 155. Min Stack
    #Leetcode# 165. Compare Version Numbers
    Linux——信息分析(四)域名分析dig、host、
    Linux——信息采集(三)dmitry、路由跟踪命令tracerouter
    密码学——cookie攻击
    final关键字
    重载与重写
    break and continue
    计算机硬件系统
  • 原文地址:https://www.cnblogs.com/w2011/p/3065086.html
Copyright © 2011-2022 走看看