語言

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 這種綁定有關。

例外狀況

值為 null。

範例

以下程式碼說明如何設定該 XmlDictionaryReaderQuotas 屬性。

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

備註

此 XmlDictionaryReaderQuotas 物件定義了對端點可處理的 SOAP 訊息複雜度的限制,這些訊息可由設定為綁定的端點處理。 這些約束包括 maxArrayLength、 maxBytesPerRead、 maxDepth、 maxNameTableCharCountmaxStringContentLength和 。 這些價值觀有助於防止阻斷服務攻擊。 如需詳細資訊,請參閱XmlDictionaryReaderQuotas。

適用於