What is the maximum size that maxReceivedMessageSize can be set to for a NetNamedPipeBinding?
Asked Answered
I

3

40

I noticed that 2147483647 seems to be a popular choice for maxReceivedMessageSize but is this the limit?

Ideology answered 17/6, 2009 at 1:49 Comment(2)
On 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?? MarcCobber
It is if you have a 32bit server...Olcott
C
43

Nope, the limit is Int64.MaxValue1 which is: 9223372036854775807

Camara answered 17/6, 2009 at 1:59 Comment(2)
In the web.config-File, only the Int32-limit seems to work. Maybe it's a parsing issue.Orren
When setting this value through code I get ArgumentOutOfRange exception for this parameter.Stargell
S
10

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

Scabbard answered 28/1, 2014 at 7:27 Comment(1)
Nope, it's Int64 (long): msdn.microsoft.com/en-us/library/…Gaylord
S
3

MaxReceivedMessageSize and MaxBufferSize must same value and MaxBufferSize is Int32.

Saturniid answered 24/1, 2013 at 12:19 Comment(3)
Not 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.Hoarse
Do you mean maxBufferPoolSize and maxReceivedMessageSize?Paleoasiatic
BasicHttpBinding MaxBufferSize is Int32, but MaxReceivedMessageSize is Int64. msdn.microsoft.com/en-us/library/…Gaylord

© 2022 - 2024 — McMap. All rights reserved.