Represents the method that will handle a custom event, which occurs when a module raises a user-defined notification.
When a request-level module is registered for the RQ_CUSTOM_NOTIFICATION notification, IIS will call the module's OnCustomRequestNotification method when a custom notification is raised.
Request-level modules can register for a custom event notification by registering for RQ_CUSTOM_NOTIFICATION in the module's RegisterModule function.
The following code example demonstrates how to create an HTTP module that does the following:
Registers for the RQ_BEGIN_REQUEST and RQ_CUSTOM_NOTIFICATION notifications.
OnBeginRequest writes an event to the Event Viewer that specifies the current notification. The method then creates an instance of an ICustomNotificationProvider interface and raises the custom notification by using the IHttpContext::NotifyCustomNotification method.
OnCustomRequestNotification uses the ICustomNotificationProvider::QueryNotificationType method to retrieve the unique identifier for the custom notification. If the unique identifier matches, OnCustomRequestNotification writes an event to the Event Viewer that specifies the custom notification.
Removes the CHttpModule class from memory and then exits.