Exceeded quota limit. Maximum number of messages for incoming messages

I increased MaxReceivedMessageSize to 2147483647, but I'm still getting this error. I am adding the same value to the server configuration and client configuration. Please helpppp

The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. Server stack trace: at System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded() at System.ServiceModel.Channels.HttpInput.GetMessageBuffer() at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream) at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& requestException) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at IService1.GetRecordsforMAR(Int32 showDeleted) at Service1Client.GetRecordsforMAR(Int32 showDeleted) Inner Exception: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. 
+4
source share
1 answer

If you set the values ​​in the <binding> section of your configuration file, you need to make sure that you bind these bindings in the bindingConfiguration attribute of the <endpoint> element:

i.e,:.

 <bindings> <wsHttpBinding> <binding name="MyWsHttpBinding" /> <!-- Other values for this binding ommitted for purposes of demonstration --> </wsHttpBinding> </bindings> <services> <service name=MyService"> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="MyWsHttpBinding" contract="IMyContract" /> <service> </services> 

Obviously, this is not a complete configuration file, it is just a visual demonstration of the relationship between the <endpoint> bindingConfiguration attribute and the <binding> name attribute. If you do not set this, WCF will provide you with a binding with default values.

+4
source

All Articles