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>

  • 相关阅读:
    Flutter 路由管理
    SpringMVC 集成 MyBatis
    关于windows下安装mysql数据库出现中文乱码的问题
    md5.digest()与md5.hexdigest()之间的区别及转换
    MongoDB基础命令及操作
    redis相关操作&基本命令使用
    python中mysql主从同步配置的方法
    shell入门基础&常见命令及用法
    ORM总结
    多任务:进程、线程、协程总结及关系
  • 原文地址:https://www.cnblogs.com/w2011/p/3065086.html
Copyright © 2011-2022 走看看