BasicHttpBinding.ReaderQuotas BasicHttpBinding.ReaderQuotas BasicHttpBinding.ReaderQuotas BasicHttpBinding.ReaderQuotas Property


Gets or sets constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.

 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

Property Value


The following example sets ReaderQuotas to application settings.

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

binding.ReaderQuotas = readerQuotas;

The value of this property can also be set in the configuration file.


        <binding name="Binding1">
          <readerQuotas maxBytesPerRead ="1000" 

          <security mode="None" />




The complexity constraints provide protection from denial of service (DOS) attacks that attempt to use message complexity to tie up endpoint processing resources. Other complexity constraints include items such as a maximum element depth and a maximum length for string content within the message.

Applies to