語言

WebHttpBindingElement.MaxReceivedMessageSize 屬性

定義

取得或設定可由綁定處理的訊息最大大小(位元組)。

public:
 property long MaxReceivedMessageSize { long get(); void set(long value); };
[System.Configuration.ConfigurationProperty("maxReceivedMessageSize", DefaultValue=65536)]
[System.Configuration.LongValidator(MinValue=1)]
public long MaxReceivedMessageSize { get; set; }
[<System.Configuration.ConfigurationProperty("maxReceivedMessageSize", DefaultValue=65536)>]
[<System.Configuration.LongValidator(MinValue=1)>]
member this.MaxReceivedMessageSize : int64 with get, set
Public Property MaxReceivedMessageSize As Long

屬性值

綁定處理訊息的最大大小(以位元組為單位)。 預設值為 65,536 位元組。

屬性

例外狀況

值小於零。

訊息超過最大分配大小。

備註

使用該 WebHttpBinding 訊息的服務可在線路上接收訊息的大小,受限於每則訊息所分配的記憶體容量。 這種對訊息大小的限制旨在限制遭受阻斷服務(DoS)攻擊的風險。

適用於