Native-Code 및 Managed-Code 알림 비교

IIS 7 웹 서버 코어의 통합 요청 처리 파이프라인을 사용하면 네이티브 코드 개발자가 C++에서 HTTP 모듈을 작성할 수 있지만 네이티브 코드 및 관리 코드 개발자가 사용할 수 있는 이벤트 알림은 동일하지 않습니다. C#과 같은 관리되는 언어에서 네이티브 코드로 HTTP 모듈을 마이그레이션하는 개발자는 새 모듈을 만들 때 이러한 차이점을 해결해야 합니다.

전역 알림

이제 개발자는 IIS 7을 사용하여 전역 수준에서 알림을 처리하는 네이티브 코드 HTTP 모듈을 만들 수 있습니다. 이전 버전의 IIS에서 개발자는 요청 수준에서만 알림을 처리하는 HTTP 모듈을 만들 수 있었습니다. 전역 수준에서 알림을 처리하는 HTTP 모듈은 다양한 서버 수준 이벤트에 대한 알림을 처리하는 데 사용됩니다.

다음 표에서는 네이티브 코드 개발자가 사용할 수 있는 전역 알림 메서드를 나열합니다.

이벤트 알림 방법 Description
OnGlobalApplicationResolveModules IIS가 등록된 모듈을 확인할 때 호출됩니다.
OnGlobalApplicationStart IIS가 애플리케이션을 시작할 때 호출됩니다.
OnGlobalApplicationStop IIS가 애플리케이션을 종료할 때 호출됩니다.
OnGlobalCacheCleanup IIS가 캐시를 지울 때 호출됩니다.
OnGlobalCacheOperation IIS가 캐시 관련 작업을 수행할 때 호출됩니다.
OnGlobalConfigurationChange 구성 파일을 변경할 때 호출됩니다.
OnGlobalCustomNotification 모듈이 사용자 정의 알림을 발생할 때 호출됩니다.
OnGlobalFileChange 웹 사이트 내의 파일이 변경될 때 호출됩니다.
OnGlobalHealthCheck 상태 관련 작업이 실행될 때 호출됩니다.
OnGlobalPreBeginRequest 요청이 통합 요청 처리 파이프라인에 들어가기 전에 호출됩니다.
OnGlobalRSCAQuery Run-Time 상태 및 제어 쿼리가 실행될 때 호출됩니다.
OnGlobalStopListening IIS가 새 요청 수락을 중지할 때 호출됩니다.
OnGlobalThreadCleanup IIS가 스레드 풀에 스레드를 반환할 때 호출됩니다.
OnGlobalTraceEvent 추적 이벤트가 발생할 때 호출됩니다.

요청 알림 비교

네이티브 코드 및 관리 코드 HTTP 모듈에 대한 요청 알림 메서드는 여러 면에서 유사하지만 완전히 유사하지는 않습니다. 예를 들어 결정적 요청 알림 메서드 목록은 네이티브 코드 및 관리 코드 모듈에 대해 거의 동일하지만 비결정적 요청 알림 메서드 목록은 크게 다릅니다.

결정적 요청 알림 Native-Code

다음 표에서는 네이티브 코드 개발자가 사용할 수 있는 결정적 요청 알림 메서드를 나열합니다.

이벤트 알림 방법 이벤트 후 알림 방법
OnBeginRequest OnPostBeginRequest
OnAuthenticateRequest OnPostAuthenticateRequest
OnAuthorizeRequest OnPostAuthorizeRequest
OnResolveRequestCache OnPostResolveRequestCache
OnMapRequestHandler OnPostMapRequestHandler
OnAcquireRequestState OnPostAcquireRequestState
OnPreExecuteRequestHandler OnPostPreExecuteRequestHandler
OnExecuteRequestHandler OnPostExecuteRequestHandler
OnReleaseRequestState OnPostReleaseRequestState
OnUpdateRequestCache OnPostUpdateRequestCache
OnLogRequest OnPostLogRequest
OnEndRequest OnPostEndRequest

결정적 요청 알림 Managed-Code

다음 표에서는 관리 코드 개발자가 사용할 수 있는 결정적 요청 알림 메서드를 나열합니다.

이벤트 알림 방법 이벤트 후 알림 방법
Beginrequest (없음)
AuthenticateRequest PostAuthenticateRequest
AuthorizeRequest PostAuthorizeRequest
ResolveRequestCache PostResolveRequestCache
MapRequestHandler PostMapRequestHandler
AcquireRequestState PostAcquireRequestState
PreRequestHandlerExecute (없음)
RequestHandlerExecute PostRequestHandlerExecute
ReleaseRequestState PostReleaseRequestState
UpdateRequestCache PostUpdateRequestCache
LogRequest PostLogRequest
Endrequest (없음)

비결정적 요청 알림 Native-Code

다음 표에서는 네이티브 코드 개발자가 사용할 수 있는 비결정적 요청 알림 메서드를 나열합니다.

이벤트 알림 방법 이벤트 후 알림 방법
OnAsyncCompletion (없음)
OnCustomRequestNotification (없음)
OnMapPath (없음)
OnReadEntity (없음)
OnSendResponse (없음)

비결정적 요청 알림 Managed-Code

다음 표에서는 관리 코드 개발자가 사용할 수 있는 비결정적 요청 알림 메서드를 나열합니다.

이벤트 알림 방법 이벤트 후 알림 방법
PreSendRequestHeaders (없음)
PreSendRequestContent (없음)

참고 항목

Native-Code HTTP 모듈 만들기
Native-Code HTTP 모듈 디자인