다음을 통해 공유


HttpRuntimeSection.MaxRequestLength 속성

정의

최대 요청 크기를 가져오거나 설정합니다.

public:
 property int MaxRequestLength { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxRequestLength", DefaultValue=4096)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int MaxRequestLength { get; set; }
[<System.Configuration.ConfigurationProperty("maxRequestLength", DefaultValue=4096)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.MaxRequestLength : int with get, set
Public Property MaxRequestLength As Integer

속성 값

Int32

최대 요청 크기(KB)입니다. 기본 크기는 4096KB(4MB)입니다.

특성

예외

선택한 값이 RequestLengthDiskThreshold보다 작은 경우

예제

다음 예제에서는 현재를 구하는 방법 MaxRequestLength 속성 값입니다.

// Get the MaxRequestLength property value.
Response.Write("MaxRequestLength: " +
  configSection.MaxRequestLength + "<br>");

// Set the MaxRequestLength property value to 2048 kilobytes.
configSection.MaxRequestLength = 2048;
' Get the MaxRequestLength property value.
Response.Write("MaxRequestLength: " & _
  configSection.MaxRequestLength & "<br>")

' Set the MaxRequestLength property value to 2048 kilobytes.
configSection.MaxRequestLength = 2048

설명

MaxRequestLength 속성 입력 스트림 버퍼링 임계값에 대 한 제한을 지정 합니다. 예를 들어, 대용량 파일 서버에 게시 하는 사용자에 의해 발생 하는 서비스 공격 거부를 방지 하기 위해이 한도 사용할 수 있습니다.

이 속성에 할당 된 값에 할당 된 값 보다 크거나 해야는 RequestLengthDiskThreshold 속성입니다.

적용 대상