I noticed that 2147483647 seems to be a popular choice for maxReceivedMessageSize but is this the limit?
-
4On the other hand, you might want to consider that setting it to 2 GB of message size means your WCF server will potentially have to deal with several messages of up to 2 GB in size simultaneously - can it do that?? Marc– marc_sJun 17, 2009 at 4:49
-
1It is if you have a 32bit server...– ChadAug 10, 2017 at 18:50
3 Answers
Nope, the limit is Int64.MaxValue1 which is: 9223372036854775807
-
7In the web.config-File, only the Int32-limit seems to work. Maybe it's a parsing issue.– marszeSep 17, 2015 at 11:52
-
1When setting this value through code I get
ArgumentOutOfRange
exception for this parameter. Nov 1, 2016 at 23:29
MaxMessageReceivedSize in basicHttpBinding appears to be an int32 - setting it over the max value of an int32 results in:
This factory buffers messages, so the message sizes must be in the range of an integer value. Parameter name: bindingElement.MaxReceivedMessageSize
MaxReceivedMessageSize
and MaxBufferSize
must same value and MaxBufferSize
is Int32
.
-
10Not true - MaxBufferSize is only used if you are using Buffering. If you are using Streaming, then it is ignored. This is why MaxReceivedMessageSize is Int64 and can be different to MaxBufferSize. Feb 26, 2013 at 10:44
-
-
BasicHttpBinding MaxBufferSize is Int32, but MaxReceivedMessageSize is Int64. msdn.microsoft.com/en-us/library/… Jun 11, 2014 at 17:47