Share via


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

屬性值

Int64

由此繫結處理之訊息的大小上限,單位為位元組。 預設值為 65,536 位元組。

屬性

例外狀況

這個值小於零。

訊息超出所配置的大小上限。

備註

服務可使用 WebHttpBinding 從網路收到的訊息大小受限於配置給各訊息的記憶體量, 這項關於訊息大小的限制是為了避免受到阻絕服務 (DoS) 攻擊。

適用於