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. Node js : Best way to define entity class

      If you start to use a DB like mongo, you might be better off creating objects with mongoose but th ...

  2. [PureScript] Break up Expressions into Cases in PureScript using Simple Pattern Matching

    Pattern matching in functional programming languages is a way to break up expressions into individua ...

  3. css调整图片位置布局

    <?xml version="1.0" encoding="utf-8"?><!DOCTYPE wml PUBLIC "-//WAP ...

  4. PowerDesigner添加表注释

    之前同事用PowerDesigner 建立数据模型后,生成到数据库中,没有注释.这导致数据库使用起来不是很方便,特别是对数据表结构不熟悉的同事. 其实,可以添加注释(并且可以逆向,即从数据库中反向更新 ...

  5. JAVA开发人员画图表总结(ECHARTS)

    随着大数据的到来,越来越多的数据需求需要开发,而这些需求不可避免需要使用JS画出图表,而大多后端JAVA开发人员对JS不太熟悉,导致身心倍受折磨,今天记录以下最近我使用echarts的步骤,供参考: ...

  6. jstat 使用日志

    如何判断JVM是否存在内存问题呢?如何判断JVM垃圾回收是否正常?一般的top指令基本上满足不了这样的需求,因为它主要监控的是总体的系统资源,很难定位到java应用程序. Jstat是JDK自带的一个 ...

  7. sqlserver 日志查看

    sqlserve的ErrorLog文件有时候会碰到文件很大的情况,可能通过命令xp_readerrorlog 或 sp_readerrorlog 执行,可以加搜索文本或起止时间 -- 日志查看 --e ...

  8. 【Linux】ssh建立隧道tunnel连接到内网设备

    root@192.168.1.105 建立隧道: ssh -l root -N -f -R 9103:127.0.0.1:2222 work@11.11.13.17 解析:把本地127.0.0.1:2 ...

  9. Kinect2.0获取关节姿态(Joint Orientation)

    Bones Hierarchy 骨骼层次结构从SpineBase作为根节点开始,一直延伸到肢体末端(头.指尖.脚): 层级结构如下图所示: 通过IBody::GetJointOrientations函 ...

  10. Aspect实现对方法日志的拦截记录

    在实际的业务系统中,我们通常都希望程序自动的打印方法的入参和返回值,某些特定的方法可能不想打印返回值(返回数据过大,打印日志影响效率),特有了下面的实现. 1.忽略返回值的java注解类 import ...