The maximum message size quota for incoming messages (5000000) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element

Aug 25 2009 12:02 PM
Hi
I get this message when I try to fetch data. Actually, data is returned from SQL Server DB in xml form, which is then deserialized( At Persister layer)  and send to service layer. Till this point everything is fine. The response xml is approx. 1 MB and value of maxReceivedMessageSize is 5000000 i.e. 5 MB in both of my config files viz. web and serivce config files.

Now when response is sent back to UI layer, I get that error. Although increasing maxReceivedMessageSize to 10000000 (10 MB) solves the problem but I wonder when my response xml size is less than maxReceivedMessageSize, why I get this error? Second, why I get this error when response is sent to UI.

Following are various binding attributes in config.

<binding name="BinaryHttpBinding_IManageOrder" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" useDefaultWebProxy="true" hostNameComparisonMode="StrongWildcard" securityMode="None" maxBufferSize="5000000" maxBufferPoolSize="65536" maxReceivedMessageSize="5000000">
  </binding>

Please help me. Any help will be much appreciated.

Regards,
Ritesh