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>

  • 相关阅读:
    HTML 5 视频/音频
    vue 未完待续
    asp.net中使用log4net
    图片预加载:jquery 图片预加载功能,可以实现先模糊在清晰的显示
    IIS配置PHP环境
    学习ASP.Net的过滤器
    最好用的jQuery插件,240多个,绝对的JQUERY插件库
    Windows7&IIS7.5部署Discuz全攻略
    AjaxPro使用
    ASP.NET XML读取、增加、修改和删除操作
  • 原文地址:https://www.cnblogs.com/w2011/p/3065086.html
Copyright © 2011-2022 走看看