NetNamedPipeBindingElement.MaxBufferSize 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指定用於儲存訊息的緩衝區最大大小(以位元組為單位)。
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 ,其中包含的內部例外。