BasicHttpBinding.ReaderQuotas Property
.NET Framework 4
Gets or sets constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Property Value
Type: System.Xml.XmlDictionaryReaderQuotasThe XmlDictionaryReaderQuotas that specifies the complexity constraints.
The following example sets ProxyAddress 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.
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1">
<readerQuotas maxBytesPerRead ="1000"
maxDepth="100"/>
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.