<readerQuotas>

定義 SOAP 訊息複雜性的條件約束,而這些條件約束可由使用此繫結所設定的端點處理。

<<system.serviceModel>>
  <bindings>

<readerQuotas 
    maxArrayLength="Integer"
        maxBytesPerRead="Integer"
        maxDepth="Integer"
        maxNameTableCharCount="Integer"
    maxStringContentLength=="Integer" />

屬性和項目

屬性

屬性 描述

maxArrayLength

正整數,指定允許的陣列長度上限。預設值為 16384。

maxBytesPerRead

正整數,指定允許每個讀取傳回的位元組上限。預設值為 4096。

maxDepth

正整數,指定允許每個讀取其巢狀節點深度的上限。預設值為 32。

maxNameTableCharCount

正整數,指定資料表名稱允許的字元數目上限。預設值為 16384。

maxStringContentLength

正整數,指定 XML 項目內容中允許的字元數上限。預設值為 8192。

子項目

父項目

這個項目是 Windows Communication Foundation (WCF) 隨附之所有標準繫結的子項目。

備註

複雜性條件約束可以防止受到阻絕服務 (DOS) 攻擊,這種攻擊會嘗試使用訊息的複雜性來困住端點處理資源。其他複雜性條件約束包含最大項目深度和訊息內最大字串內容長度等項目。

請參閱

參考

<customBinding>
XmlDictionaryReaderQuotasElement

概念

<binding>

其他資源

Windows Communication Foundation Bindings
Extending Bindings
Custom Bindings
Windows Communication Foundation Bindings
Configuring System-Provided Bindings
Using Bindings to Configure Services and Clients