다음을 통해 공유


RequestFilteringSection 클래스

들어오는 URL 요청의 검사를 구성합니다.

구문

class RequestFilteringSection : ConfigurationSectionWithCollection  

메서드

다음 표에서는 클래스에서 노출하는 메서드를 나열합니다 RequestFilteringSection .

속성 설명
추가 ConfigurationSectionWithCollection에서 상속됩니다.
지우기 ConfigurationSectionWithCollection에서 상속됩니다.
가져오기 ConfigurationSectionWithCollection에서 상속됩니다.
GetAllowDefinition ( ConfigurationSection에서 상속됩니다.)
GetAllowLocation ConfigurationSection에서 상속됩니다.
제거 ConfigurationSectionWithCollection에서 상속됩니다.
RevertToParent ConfigurationSection에서 상속됩니다.
SetAllowDefinition ConfigurationSection에서 상속됩니다.
SetAllowLocation ConfigurationSection에서 상속됩니다.

속성

다음 표에서는 클래스에서 노출하는 속성을 나열합니다 RequestFilteringSection .

속성 Description
AllowDoubleEscaping 읽기/쓰기 boolean 값입니다. true 이중 이스케이프 문자가 URL에 허용되면 이스케이프 문자 그렇지 않으면 입니다 false. 기본값은 false입니다.
AllowHighBitCharacters 읽기/쓰기 boolean 값입니다. true 비 ASCII 문자가 URL에 허용되면 이고, 그렇지 않으면 입니다 false. 기본값은 true입니다.
DenyUrlSequences 웹 서버를 공격하는 데 사용할 수 있는 URL 시퀀스가 포함된 UrlSequenceSettings 값은 거부됩니다.
FileExtensions 요청에서 허용되거나 거부될 수 있는 파일 확장자를 지정하는 읽기/쓰기 FileExtensionsSettings 값입니다.
HiddenSegments 콘텐츠가 클라이언트에 제공되지 않는 세그먼트를 지정 하는 HiddenSegmentSettings 값입니다. 참고: 세그먼트는 두 슬래시 사이의 URL 부분 또는 마지막 슬래시 이후 URL의 일부입니다. 예를 들어 URL /segment1/segment2/segment3.asp에는 segment1, segment2 및 segment3.asp의 세 세그먼트가 있습니다. 참고: 기본적으로 bin, App_code, App_GlobalResources, App_LocalResources, App_WebReferences, App_Data 및 App_Browsers 세그먼트가 차단됩니다.
Location (에서 ConfigurationSection상속됨) 키 속성입니다.
Path (에서 ConfigurationSection상속됨) 키 속성입니다.
RequestLimits 들어오는 HTTP 요청에 대한 크기 제한을 지정하는 RequestLimitsElement 값입니다.
SectionInformation ConfigurationSection에서 상속됩니다.
Verbs 허용하거나 거부할 HTTP 동사를 지정하는 읽기/쓰기 VerbsSettings 값입니다. 참고: HTTP 동사에 대한 와일드카드는 지원되지 않습니다.

를 서브클래싱합니다.

이 클래스에는 하위 클래스가 없습니다.

설명

이 클래스는 이전 버전의 IIS에서 사용하는 URLScan 도구의 기능을 IIS 7에 통합합니다.

참고

클래스의 기능이 RequestFilteringSection 작동하려면 요청 필터링 모듈(Modrqflt.dll)을 설치해야 합니다.

예제

다음 예제에서는 ApplicationHost.config 파일의 요청 필터링 섹션에 대한 모든 속성을 보여줍니다.

' Connect to the WMI WebAdministration namespace.  
Set objWMIService = GetObject("winmgmts:root\WebAdministration")  
  
' Get the request-filtering section.  
Set oRequestFilteringSection = objWMIService.Get( _  
"RequestFilteringSection.Path='MACHINE/WEBROOT/APPHOST',Location=''")  
  
' Show the path.  
WScript.Echo "[Request Filtering Path]"  
WScript.Echo oRequestFilteringSection.Path_  
WScript.Echo   
  
' Show the AllowDoubleEscaping property as "True" or "False."  
WScript.Echo "[AllowDoubleEscaping]"  
WScript.Echo CStr(oRequestFilteringSection.AllowDoubleEscaping)  
WScript.Echo   
  
' Show the AllowHighBitCharacters property as "True" or "False."  
WScript.Echo "[AllowHighBitCharacters]"  
WScript.Echo CStr(oRequestFilteringSection.AllowHighBitCharacters)  
WScript.Echo   
  
' List the denied URL sequences.  
WScript.Echo "[Denied Url Sequences]"  
For Each oSequence In _  
    oRequestFilteringSection.DenyUrlSequences.DenyUrlSequences  
    WScript.Echo oSequence.Sequence  
Next  
WScript.Echo   
  
' List the file extensions settings.  
WScript.Echo "[File Extensions]"  
  
' Show the AllowUnlisted property as "True" or "False."  
WScript.Echo "Allow unlisted file extensions: " & _  
    oRequestFilteringSection.FileExtensions.AllowUnlisted  
WScript.Echo  
  
' List each file extension and show whether it is allowed.  
For Each oFileExtension In _  
    oRequestFilteringSection.FileExtensions.FileExtensions  
    WScript.Echo "File extension: " & oFileExtension.FileExtension  
    WScript.Echo "File extension allowed: " & oFileExtension.Allowed  
    WScript.Echo  
Next  
WScript.Echo   
  
' List the hidden segments.  
WScript.Echo "[Hidden Segments]"  
For Each oHiddenSegment In _  
    oRequestFilteringSection.HiddenSegments.HiddenSegments  
    WScript.Echo oHiddenSegment.Segment  
Next  
WScript.Echo   
  
' Show the request limits settings.  
WScript.Echo "[Request Limits]"  
WScript.Echo "maxAllowedContentLength: " & _  
oRequestFilteringSection.RequestLimits.maxAllowedContentLength  
WScript.Echo "maxUrl: " & oRequestFilteringSection.RequestLimits.maxUrl  
WScript.Echo "maxQueryString: " & oRequestFilteringSection.RequestLimits.maxQueryString  
WScript.Echo   
  
' Show the header limits settings.  
WScript.Echo vbtab & "[Header Limits]"  
For Each oHeaderLimit In _  
    oRequestFilteringSection.RequestLimits.HeaderLimits.HeaderLimits  
    WScript.Echo vbtab & "Header: " & oHeaderLimit.Header  
    WScript.Echo vbtab & "Header size limit: " & oHeaderLimit.SizeLimit  
    WScript.Echo   
Next  
  
' List the verbs settings.  
WScript.Echo "[Verbs]"  
WScript.Echo "Allow unlisted verbs: " & oRequestFilteringSection.Verbs.AllowUnlisted  
WScript.Echo   
  
' List each verb and show whether it is allowed.  
For Each oVerb In oRequestFilteringSection.Verbs.Verbs  
    WScript.Echo "Verb: " & oVerb.Verb  
    WScript.Echo "Verb allowed: " & oVerb.Allowed  
    WScript.Echo  
Next  
  

상속 계층 구조

ConfigurationSection

ConfigurationSectionWithCollection

RequestFilteringSection

요구 사항

형식 Description
클라이언트 - Windows Vista의 IIS 7.0
- Windows 7의 IIS 7.5
- Windows 8의 IIS 8.0
- WINDOWS 10 IIS 10.0
서버 - Windows Server 2008의 IIS 7.0
- Windows Server 2008 R2의 IIS 7.5
- Windows Server 2012의 IIS 8.0
- Windows Server 2012 R2의 IIS 8.5
- WINDOWS SERVER 2016 IIS 10.0
제품 - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF 파일 WebAdministration.mof

참고 항목

ConfigurationSectionWithCollection 클래스
FileExtensionElement 클래스
FileExtensionsSettings 클래스
HeaderLimitsSettings 클래스
HiddenSegmentSettings 클래스
<requestFiltering>
RequestLimitsElement 클래스
UrlSequence 클래스
UrlSequenceSettings 클래스
VerbElement 클래스
VerbsSettings 클래스