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

て烟熏妆下的殇ゞ 提交于 2019-11-29 22:53:28
AgileJon

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

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

fernando

MaxReceivedMessageSize and MaxBufferSize must same value and MaxBufferSize is Int32.

Use the defaults for the maximum size so one doesn't fat finger a value:

binding.MaxBufferSize          = int.MaxValue;
binding.MaxReceivedMessageSize = long.MaxValue;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!