Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MtomMessageEncodingBindingElement::MaxBufferSize Property

 

Gets or sets the maximum buffer size.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
property int MaxBufferSize {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The maximum size of the buffer. The default value is 65536 (0x10000) bytes.

Exception Condition
ArgumentNullException

The value set is less than or equal to zero.

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.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft