BasicHttpBinding.ReaderQuotas 속성

정의

이 바인딩으로 구성된 엔드포인트에서 처리할 수 있는 SOAP 메시지의 복잡성에 대한 제약 조건을 가져오거나 설정합니다.

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

복잡성 제약 조건을 지정하는 XmlDictionaryReaderQuotas입니다.

예제

다음 예제에서는 애플리케이션 설정에 ReaderQuotas를 설정합니다.

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

binding.ReaderQuotas = readerQuotas;

이 속성의 값은 구성 파일에서 설정할 수도 있습니다.

<configuration>
  <system.serviceModel>

    <bindings>
      <basicHttpBinding>
        <binding name="Binding1">
          <readerQuotas maxBytesPerRead ="1000" 
                        maxDepth="100"/>

          <security mode="None" />
        </binding>
      </basicHttpBinding>
    </bindings>

  </system.serviceModel>

</configuration>

설명

복잡성 제약 조건은 메시지 복잡성을 사용하여 엔드포인트 처리 리소스를 연결하려는 DOS(서비스 거부) 공격으로부터 보호를 제공합니다. 다른 복잡성 제약 조건에는 메시지 내의 문자열 콘텐츠에 대한 최대 요소 깊이 및 최대 길이와 같은 항목이 포함됩니다.

적용 대상