WebMessageEncodingElement.ReaderQuotas Property


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

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

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

public XmlDictionaryReaderQuotasElement ReaderQuotas { get; }

Property Value

Type: System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement

The XmlDictionaryReaderQuotasElement that specifies the complexity constraints.

The complexity constraints include items like a maximum element depth, or a maximum length for string content within the message. The constraints protect against a type of denial of service (DOS) attacks that attempt to use message complexity to tie up endpoint processing resources.

XmlDictionaryReaderQuotasElement webMessageReaderQuotasElement = webMEE.ReaderQuotas;
Console.WriteLine("The max depth of the reader Quotas is: {0}", webMessageReaderQuotasElement.MaxDepth);

.NET Framework
Available since 3.5
Return to top