NetMsmqBinding.ReaderQuotas Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the XmlDictionaryReaderQuotas that is associated with this binding.

Namespace:   System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public XmlDictionaryReaderQuotas ReaderQuotas { get; set; }

Property Value

Type: System.Xml.XmlDictionaryReaderQuotas

The XmlDictionaryReaderQuotas associated with this binding.

Exception Condition

The value is null.

The XmlDictionaryReaderQuotas object defines constraints on the complexity of SOAP messages that can be processed by endpoints configured with a binding. These constraints include maxArrayLength, maxBytesPerRead, maxDepth, maxNameTableCharCount, and maxStringContentLength. These values aid in the prevention of denial of service attacks. For more information, seeXmlDictionaryReaderQuotas.

The following code shows how to set the XmlDictionaryReaderQuotas property.

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

.NET Framework
Available since 3.0
Return to top