語言

ConnectionOrientedTransportElement.MaxBufferSize 屬性

定義

取得或設定緩衝區的最大大小。

public:
 property int MaxBufferSize { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxBufferSize", DefaultValue=65536)]
[System.Configuration.IntegerValidator(MinValue=1)]
public int MaxBufferSize { get; set; }
[<System.Configuration.ConfigurationProperty("maxBufferSize", DefaultValue=65536)>]
[<System.Configuration.IntegerValidator(MinValue=1)>]
member this.MaxBufferSize : int with get, set
Public Property MaxBufferSize As Integer

屬性值

用於緩衝記憶體中接收訊息的最大位元組數。 預設值為 65,536 位元組。

屬性

備註

此特性僅適用於串流訊息的標頭。

此值至少應是 SOAP 標頭的最大可能大小,這些標頭在緩衝模式下讀取。

此屬性的值必須小於或等於 MaxMessageSize,且必須大於訊息標頭的大小。 否則,頻道會拋出例外。

如果你收到的資料超過緩衝容量,通道會拋 CommunicationException出一個 QuotaExceededException ,其中包含的內部例外。

適用於