Bewerken

Delen via


HttpTransportBindingElement.MaxBufferSize Property

Definition

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.

public:
 property int MaxBufferSize { int get(); void set(int value); };
public int MaxBufferSize { get; set; }
member this.MaxBufferSize : int with get, set
Public Property MaxBufferSize As Integer

Property Value

The maximum size, in bytes, of the buffer.

Examples

The following example sets this property to use when performing requests on the binding.

HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();  
httpBinding.MaxBufferSize = 16384;  

Remarks

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.

Applies to