WebService error maximum Message Size quota for incoming messages (65536) has been exceeded. The incoming message (655

Source: Internet
Author: User
Tags xml reader

An error occurs when the message received by a WebService application is very large.

1: Maximum Message Size quota for incoming messages (65536) has been exceeded.The maximum Message Size quota of the incoming message (65536) has been exceeded. To increase the quota, use the maxcompute edmessagesize attribute on the corresponding binding element.

Note:An error occurred while executing the current Web request. Check the stack trace information to learn about this error andCodeDetailed information about the cause of the error.
Exception details:System. servicemodel. quotaexceededexception: The maximum Message Size quota for incoming messages (65536) has been exceeded. To increase the quota, use the maxcompute edmessagesize attribute on the corresponding binding element.

Solution:

Modify the Web. config file. The maxcompute edmessagesize can be increased to 2147483647.

Maxbuffersize = "2147483647" maxbufferpoolsize = "524288" maxcompute edmessagesize = "2147483647"

 

2:When reading XML data, the maximum length of string content exceeds the limit (8192 ). You can add this quota by changing the maxstringcontentlength attribute of the xmldictionaryreaderquotas object used when creating an XML reader. 211st rows at 394.

Solution:

You can also modify the maxstringcontentlength in Web. config. This problem occurs when some data is relatively long. You can change it to a larger value.

<Readerquotas maxdepth = "64" maxstringcontentlength = "8192000" maxarraylength = "16384000"
Maxbytesperread = "4096000" maxnametablecharcount = "16384000"/>

 

The complete code is as follows:

<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" maxcompute edmessagesize = "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" maxcompute edmessagesize = "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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.