WebService error Maximum message size quota for incoming messages (65536) have been exceeded. Maximum message size quotas for incoming messages (65536) exceeded

Source: Internet
Author: User
Tags xml reader

Go from Hela to learn the original WebService error Maximum message size quota for incoming messages (65536) have been exceeded. Maximum message sizing quota for incoming messages (65536) exceeded

Problem 1:webservice Error Maximum message size quota for incoming messages (65536) have been exceeded.

This afternoon on the internet has been searching for solutions for nearly 2 hours, people will collapse, in addition to StackOverflow on the foreign language some information, the domestic almost disappeared. Very distressed, English looks very laborious, also did not give a direct solution. Later in See Hela study of an article, first put it over, readers.

The root cause of the problem is, as the error exception illustrates, the starting method says, but for the newcomer, you don't know where to set it. It's actually the following in app. Config, setting the values of some of the requested parameters.

This way, you get rid of the default parameter's request size setting, and you can request a larger package. Set the contents of the box in the code snippet below, you can copy it (note that only the contents of the box are copied, and the values in the ellipse are modified so that they are consistent).

<system.serviceModel> <bindings> <basicHttpBinding> <binding name="Serverupdatersoap"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=" -"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> <client > <endpoint address="Http://localhost:3604/ServerUpdater.asmx"binding="BasicHttpBinding"bindingconfiguration="Serverupdatersoap"Contract="Webreferenceupdater.serverupdatersoap"Name="Serverupdatersoap"/> </client> </system.serviceModel></configuration>
View Code

2: The maximum string content length quota (8192) is exceeded when reading XML data. You can increase this quota by changing the Maxstringcontentlength property of the XmlDictionaryReaderQuotas object that is used when you create the XML reader. Line No. 211, Position 394.

Workaround:

Also modifies the maxstringcontentlength in the Web. config, this is the problem when some of the data is relatively long, make it bigger.

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

WebService error Maximum message size quota for incoming messages (65536) have been exceeded. Maximum message size quotas for incoming messages (65536) exceeded

Related Article

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.