Redigera

Dela via


MtomMessageEncodingBindingElement.MaxBufferSize Property

Definition

Gets or sets the maximum buffer size.

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 of the buffer. The default value is 65536 (0x10000) bytes.

Exceptions

The value set is less than or equal to zero.

Remarks

Message Transmission Optimization Mechanism (MTOM) messages in Windows Communication Foundation (WCF) can consist of multiple MIME parts. The message always includes a Multipurpose Internet Mail Extensions (MIME) part that contains the infoset portion of the message. In addition, if the message contains binary data that is optimized, it may contain additional MIME parts that contain binary data. There are no requirements imposed about what order these MIME parts must appear in the message. The message reading process sometimes must buffer MIME parts if they appear out of order. The message reading process also may have to buffer relevant MIME header information in each part. This MaxBufferSize quota is intended to cap the amount of memory that can be allocated when reading MTOM messages and so limit the excessive consumption of memory due to the buffering requirements.

Applies to