MtomMessageEncodingBindingElement.MaxBufferSize 屬性

定義

取得或設定緩衝區大小上限。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

屬性值

緩衝區大小上限。The maximum size of the buffer. 預設值為 65536 (0x10000) 位元組。The default value is 65536 (0x10000) bytes.

例外狀況

設定的值小於或等於零。The value set is less than or equal to zero.

備註

Windows Communication Foundation (WCF) 中的訊息傳輸優化機制 (MTOM) 訊息可以由多個 MIME 部分組成。Message Transmission Optimization Mechanism (MTOM) messages in Windows Communication Foundation (WCF) can consist of multiple MIME parts. 此訊息永遠包括含有訊息之資訊集部分的多用途網際網路郵件延伸標準 (Multipurpose Internet Mail Extension,MIME) 部分。The message always includes a Multipurpose Internet Mail Extensions (MIME) part that contains the infoset portion of the message. 此外,如果訊息包含最佳化的二進位資料,它可能會包含其他具有二進位資料的 MIME 部分。In addition, if the message contains binary data that is optimized, it may contain additional MIME parts that contain binary data. 對於這些 MIME 部分出現在訊息中的必要順序,並無任何強制要求。There are no requirements imposed about what order these MIME parts must appear in the message. 如果 MIME 部分未按順序出現,訊息讀取程序有時必須緩衝處理它們。The message reading process sometimes must buffer MIME parts if they appear out of order. 訊息讀取程序也可能必須緩衝處理各部分中的相關 MIME 標頭資訊。The message reading process also may have to buffer relevant MIME header information in each part. 這個 MaxBufferSize 配額的目的是要限制在讀取 MTOM 訊息時可以配置的記憶體量,以限制由於緩衝處理需求而過度取用記憶體。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.

適用於