NetMsmqBinding.ReaderQuotas 屬性

定義

取得或設定與這個繫結關聯的 XmlDictionaryReaderQuotas

public:
 property System::Xml::XmlDictionaryReaderQuotas ^ ReaderQuotas { System::Xml::XmlDictionaryReaderQuotas ^ get(); void set(System::Xml::XmlDictionaryReaderQuotas ^ value); };
public System.Xml.XmlDictionaryReaderQuotas ReaderQuotas { get; set; }
member this.ReaderQuotas : System.Xml.XmlDictionaryReaderQuotas with get, set
Public Property ReaderQuotas As XmlDictionaryReaderQuotas

屬性值

XmlDictionaryReaderQuotas

與此繫結相關聯的 XmlDictionaryReaderQuotas

例外狀況

值為 null

範例

下列程式碼會示範如何設定 XmlDictionaryReaderQuotas 屬性。

NetMsmqBinding binding = new NetMsmqBinding();
XmlDictionaryReaderQuotas readerQuotas = new XmlDictionaryReaderQuotas();
readerQuotas.MaxArrayLength = 25 * 1024;
binding.ReaderQuotas = readerQuotas;

備註

XmlDictionaryReaderQuotas 物件會定義 SOAP 訊息複雜度的條件約束 (Constraint),這些條件約束可由使用繫結所設定的端點處理。 這些條件約束包括 maxArrayLengthmaxBytesPerReadmaxDepthmaxNameTableCharCountmaxStringContentLength。 這些值有助於防止阻絕服務攻擊。 如需詳細資訊,請參閱XmlDictionaryReaderQuotas

適用於