This documentation is archived and is not being maintained.

HttpTransportBindingElement.MaxBufferSize Property

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)

public int MaxBufferSize { get; set; }
/** @property */
public int get_MaxBufferSize ()

/** @property */
public void set_MaxBufferSize (int value)

public function get MaxBufferSize () : int

public function set MaxBufferSize (value : int)

Not applicable.

Property Value

The maximum size, in bytes, of the buffer.

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.

[C#] The following example sets this property to use when performing requests on the binding.

HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();

httpBinding.MaxBufferSize = true;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: