System. servicemodel. communicationexception: 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. ---> 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.
--- End of the internal exception stack trace ---
Server stack trace: in system. servicemodel. channels. messageencoder. buffermessagestream (Stream stream, buffermanager, int32 maxbuffersize) in system. servicemodel. channels. messageencoder. readmessage (Stream stream, buffermanager, int32 maxbuffersize, string contenttype) in system. servicemodel. channels. httpinput. readchunkedbufferedmessage (Stream inputstream)
In system. servicemodel. channels. httpinput. parseincomingmessage (exception & requestexception) in system. servicemodel. channels. httpchannelfactory. httprequestchannel. httpchannelrequest. waitforreply (timespan timeout) in system. servicemodel. channels. requestchannel. request (message, timespan timeout) in system. servicemodel. dispatcher. requestchannelbinder. request (message, timespan timeout) in system. servicemodel. channels. servicechannel. call (string action, Boolean oneway, proxyoperationruntime operation, object [] INS, object [] outs, timespan timeout) in system. servicemodel. channels. servicechannelproxy. invokeservice (imethodcallmessage methodcall, proxyoperationruntime operation) in system. servicemodel. channels. servicechannelproxy. invoke (iMessage message)
............
Solution: Set the maxcompute edmessagesize and other attribute values of the client,CodeThe settings are as follows:
Serviceclient Service = New Serviceclient ();
(Service. endpoint. Binding As Nettcpbinding). maxcompute edmessagesize = Int . Maxvalue;
(Service. endpoint. Binding As Nettcpbinding). maxbufferpoolsize = Int . Maxvalue;
(Service. endpoint. Binding As Nettcpbinding). maxbuffersize = Int . Maxvalue;
You can also set the following code in the configuration file (App. config/Web. config:
As long as maxcompute edmessagesize is greater than the returned amount.