WebService应用中如果收到的信息非常大时出错。

1:Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 
异常详细信息: System.ServiceModel.QuotaExceededException: 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。

解决办法:

修改Web.Config文件,其中的MaxReceivedMessageSize  可以改大一点,改成2147483647好了。

maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"

2:读取 XML 数据时,超出最大字符串内容长度配额 (8192)。通过更改在创建 XML 读取器时所使用的 XmlDictionaryReaderQuotas 对象的 MaxStringContentLength 属性,可增加此配额。 第 211 行,位置为 394。

解决办法:

也是修改Web.Config中的MaxStringContentLength ,这是有些数据比较长的时候出现这个问题,改大一点就可以了吧。

<readerQuotas maxDepth="64" maxStringContentLength="8192000" maxArrayLength="16384000"
            maxBytesPerRead="4096000" maxNameTableCharCount="16384000" />

下面是完整的代码:

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="FileServiceSoapBinding" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="64" maxStringContentLength="8192000" maxArrayLength="16384000"
            maxBytesPerRead="4096000" maxNameTableCharCount="16384000" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="FileServiceSoapBinding1" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="64" maxStringContentLength="8192000" maxArrayLength="16384000"
            maxBytesPerRead="4096000" maxNameTableCharCount="16384000" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>

WebService出错 Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额的更多相关文章

  1. WCF错误"The maximum message size quota for incoming messages (65536) has been exceeded."

    错误原因有三:超过最大接受的传输值 1.webconfig或者 app.config 文件中的binding 节点进行 配置 maxBufferSize="2147483647" ...

  2. Additional information: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding elemen

    wcf service: <system.serviceModel> <bindings> <basicHttpBinding> <binding name= ...

  3. webservice MaxReceivedMessageSize :已超过传入消息(65536)的最大消息大小配额

    在客户端的webconfig文件的webservice节点进行如下配置:(注:此处客户端为应用程序的config文件) <system.serviceModel> <bindings ...

  4. WebService 之 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。

    在使用 WCF 中,遇到如下问题: 已超过传入消息(65536)的最大消息大小配额.若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性. 问题说明: 客户端调用 ...

  5. [Bug]The maximum array length quota (16384) has been exceeded while reading XML data.

    写在前面 在项目中,有客户反应无法正常加载组织结构树,弄了一个测试的程序,在日志中查看到如下信息: Error in deserializing body of reply message for o ...

  6. nova instance出错:"message": "Proxy error: 502 Read from server failed

    执行 $ nova resize instance1 时候出错: {, "details": " File \"/opt/stack/nova/nova/com ...

  7. “Invalid maximum heap size” when running Maven

    运行mvn package,报错: Invalid maximum heap size: -Xmx512m. Error: Could not create the Java Virtual Mach ...

  8. soapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large or an antivirus or firewall tool could block the execution.

    版本: soapUI-5.2.1 问题: 启动soapUI时报错:The JVM could not be started. The maximum heap size (-Xmx) might be ...

  9. Spring Boot:The field file exceeds its maximum permitted size of 1048576 bytes

    错误信息:The field file exceeds its maximum permitted size of 1048576 bytes原因是因为SpringBoot内嵌tomcat默认所能上传 ...

随机推荐

  1. 转: H264码流分析 --264分析两大利器:264VISA和Elecard StreamEye Tools

    转码: http://www.360doc.com/content/13/0225/19/21412_267854467.shtml ESEYE视频工具全称是什么: Elecard StreamEye ...

  2. PC 微信扫码登陆

    目录 1.注册微信开发平台 2.微信开发平台添加网站应用 3.PC微信登录流程介绍 4.获取用户基本信息(UnionID机制) 1.注册微信开发平台 官网网址 自行注册,需要注意的是注册邮箱号不用与腾 ...

  3. Python代码规范(PEP8)问题及解决

    转载:https://blog.csdn.net/Jason_Lewis/article/details/75386598 最近刚刚接触Python,为了养成好习惯,尽量保证自己写的代码符合PEP8代 ...

  4. 提高Mxd地图渲染出图效率的方法

    测试 在ArcGIS地图渲染非常耗时,特别是标注较多时,下面是做的一些性能测试   小结 1.地图渲染的数据量是显示出图速度的关键.主要注意: (1)与数据库存储的数据量关系不大.例如数据库有1万条数 ...

  5. KindEditor-编辑器配置参数属性

    KindEditor-源码分析 通过使用KE.show(config)方法即可将编辑器添加到文档中.下面是一段源码: KE.show = function(args) {     KE.init(ar ...

  6. C# Directory.GetFiles()获取多个类型格式的文件

    第一种方式 System.IO.Directory.GetFiles()获取多个类型格式的文件 System.IO.Directory.GetFiles("c:\","( ...

  7. mysql安装后服务启动不了

    1.1 前言 最近真的是倒霉到家,装个mysql都能把所有的问题给问候了一遍······不过这也是一个宝贵的经验,得好好总结下,毕竟也不知道以后会不会再次遇到.如果有网友也能像我这样倒霉,但是能够幸运 ...

  8. PASCAL知识

    API Index http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delph ...

  9. Win7安装golang开发环境--备忘录

    首次接触golang,非常多东西不熟悉,Git也没有安装. 1 安装golang 1.1 下载golang 我是在Golang中国的下载频道下载的golang1.6.链接例如以下: http://ww ...

  10. 使用pywin32处理excel文件

    #!/usr/bin/env python #-*- coding:utf-8 -*- ####################################################### ...