httpModules 요소(ASP.NET 설정 스키마)

[이 설명서는 미리 보기 전용이며, 이후 릴리스에서 변경될 수 있습니다. 비어 있는 항목은 자리 표시자로 포함됩니다.]

응용 프로그램 내에서 HTTP 모듈을 구성합니다. 이 요소는 구성 계층 구조의 모든 수준에서 선언할 수 있습니다.

<httpModules> 
   <add... />
   <remove... />
   <clear/>
</httpModules>

특성 및 요소

다음 단원에서는 특성, 자식 요소 및 부모 요소에 대해 설명합니다.

특성

없음

자식 요소

요소

설명

add

선택적 요소입니다.

응용 프로그램에 httpModules 요소를 추가합니다.

clear

선택적 요소입니다.

응용 프로그램에서 모든 httpModules 요소를 제거합니다.

remove

선택적 요소입니다.

httpModules 요소에 대한 참조를 제거합니다.

이 값은 이전 add 지시문의 값과 정확하게 일치해야 합니다.

부모 요소

요소

설명

configuration

공용 언어 런타임 및 .NET Framework 응용 프로그램에서 사용하는 모든 구성 파일의 필수 루트 요소를 지정합니다.

system.web

ASP.NET 구성 섹션의 루트 요소를 지정합니다.

설명

기본 구성

다음의 기본 httpModules 요소는 .NET Framework 버전 1.1의 Machine.config 파일에 구성되어 있습니다.

<httpModules>
     <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/>
     <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
     <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"/>
     <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/>
     <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule"/>
     <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"/>
     <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"/>
     <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, 
          Version=1.0.5000.0, Culture=neutral, 
          PublicKeyToken=b03f5f7f11d50a3a"/>
</httpModules>

다음의 기본 httpModules 요소는 .NET Framework 버전 1.0의 Machine.config 파일에 구성되어 있습니다.

<httpModules>
     <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
     <add name="Session" type="System.Web.SessionState.SessionStateModule" />
     <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
     <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
     <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule" />
     <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
     <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" />
</httpModules>

다음의 기본 httpModules 요소는 .NET Framework 버전 2.0의 루트 Web.config 파일에 구성되어 있습니다.

<httpModules>
     <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
     <add name="Session" type="System.Web.SessionState.SessionStateModule" />
     <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
     <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
     <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule" />
     <add name="RoleManager" type="System.Web.Security.RoleManagerModule" />
     <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
     <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" />
     <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule" />
     <add name="Profile" type="System.Web.Profile.ProfileModule" />
</httpModules>

예제

다음 코드 예제에서는 ASP.NET 응용 프로그램에 세 개의 HttpModule참조를 추가하는 방법을 보여 줍니다.

<configuration>
   <system.web>
      <httpModules>
         <add type="System.Web.Caching.OutputCacheModule" 
              name="OutputCache"/>
         <add type="System.Web.SessionState.SessionStateModule" 
              name="Session"/>
         <add type=Selector, selector.dll"
              name="Selector"/>
      </httpModules>
   </system.web>
</configuration>

요소 정보

구성 섹션 처리기

System.Web.Configuration.HttpModulesSection

구성 멤버

SystemWebSectionGroup.HttpModules

구성 가능한 위치

Machine.config

루트 수준의 Web.config

응용 프로그램 수준의 Web.config

가상 또는 실제 디렉터리 수준의 Web.config

요구 사항

Microsoft IIS(인터넷 정보 서비스) 버전 5.0, 5.1 또는 6.0

.NET Framework 버전 1.0, 1.1 또는 2.0

Microsoft Visual Studio 2003 또는 Visual Studio 2005

참고 항목

작업

How to: Lock ASP.NET Configuration Settings

참조

system.web 요소(ASP.NET 설정 스키마)

<configuration> 요소

httpModules에 대한 add 요소(ASP.NET 설정 스키마)

httpModules에 대한 clear 요소(ASP.NET 설정 스키마)

httpModules에 대한 remove 요소(ASP.NET 설정 스키마)

System.Configuration

System.Web.Configuration

개념

ASP.NET Configuration Overview

ASP.NET Server Controls and Browser Capabilities

Securing Configuration

Configuration Inheritance

기타 리소스

ASP.NET Configuration Files

ASP.NET 구성 설정

일반 구성 설정(ASP.NET)

ASP.NET Configuration API