Gets or sets the maximum size of the buffer to use. For buffered messages this value is the same as MaxReceivedMessageSize. For streamed messages, this value is the maximum size of the SOAP headers, which must be read in buffered mode.
Namespace:
System.ServiceModel.Channels
Assembly:
System.ServiceModel (in System.ServiceModel.dll)
Visual Basic (Declaration)
Public Property MaxBufferSize As Integer
Dim instance As HttpTransportBindingElement
Dim value As Integer
value = instance.MaxBufferSize
instance.MaxBufferSize = value
public int MaxBufferSize { get; set; }
public:
property int MaxBufferSize {
int get ();
void set (int value);
}
public function get MaxBufferSize () : int
public function set MaxBufferSize (value : int)
For streamed messages, if the size of the message headers is greater than this property, then a QuotaExceededException is thrown. For a non-streamed message, if the message size is greater than this property, then the message is dropped.
If not specified, this defaults to 65536.
The following example sets this property to use when performing requests on the binding.
[C#]
HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();
httpBinding.MaxBufferSize = 16384;
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0
.NET Compact Framework
Supported in: 3.5
Reference