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 做為內部例外狀況。

適用於