I noticed that 2147483647 seems to be a popular choice for maxReceivedMessageSize but is this the limit?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Nope, the limit is Int64.MaxValue1 which is: 9223372036854775807
回答2:
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
回答3:
MaxReceivedMessageSize
and MaxBufferSize
must same value and MaxBufferSize
is Int32
.
回答4:
Use the defaults for the maximum size so one doesn't fat finger a value:
binding.MaxBufferSize = int.MaxValue;
binding.MaxReceivedMessageSize = long.MaxValue;