Loading ...

WCF: This factory buffers messages, so the message sizes must be in the range of an integer value. | CodeAsp.Net

WCF: This factory buffers messages, so the message sizes must be in the range of an integer value.

 /5
0 (0votes)

While working with WCF application I was getting the following error today:

This factory buffers messages, so the message sizes must be in the range of an integer value.Parameter name: bindingElement.MaxReceivedMessageSize


Reason
:
I was using the following code in my application:

this.MaxReceivedMessageSize = long.MaxValue;

Solution:
As the error specifying we need to change the abobe to:

this.MaxReceivedMessageSize = int.MaxValue;

After changing it to int.Max the error was gone.

Comments (no comments yet)

Top Posts