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>

  • 相关阅读:
    json_decode 转数组
    json_encode转义中文问题
    ECshop后台新功能权限添加
    mysql中int、bigint、smallint 和 tinyint的区别与长度的含义
    mysql数据库表设计小数类型
    mysql group_concat用法
    PHP socket通信之UDP
    本地tp项目上传服务器报runtime/cache错误
    mysql 命令一套
    linux 9 -- 交互式使用Bash Shell
  • 原文地址:https://www.cnblogs.com/w2011/p/3065086.html
Copyright © 2011-2022 走看看