The following table shows events that can be intercepted using ASP. NET during request processing. All events are listed in the order of occurrence.
The first list displays the events generated before processing the request.
Beginrequest. This event indicates a new request; each request must generate this event.
Authenticaterequest. This event indicates that the configured authentication mechanism has verified the request. Attach this event to the filter to ensure that the request has passed authentication.
Authorizerequest. Like authenticaterequest, this event marks another step in the request processing process and the request has been authorized.
Resolverequestcache. The output cache module uses this event to simplify processing of cached requests.
Acquirerequeststate. This event indicates that each request status should be obtained.
Prerequesthandlerexecute. This event indicates that the request handler will be executed. This is the last event that you can participate in before calling the HTTP processing program of this request.
The next list shows the events generated after processing the request. These events are listed in the order of occurrence:
Postrequesthandlerexecute. This event indicates that the HTTP processing program has completed processing the request.
Releaserequeststate. This event indicates that the request status should be stored because the application has completed processing the request.
Updaterequestcache. This event indicates that code processing has been completed and files can be added to the ASP. NET cache.
Endrequest. This event indicates that all requests have been processed. This is the last event called at the end of the application.
In addition, the following three pre-processing events can be triggered in an uncertain order:
Presendrequestheaders. This event indicates that the HTTP header will be sent to the client. Therefore, you can add, delete, or modify header information before sending the message.
PreSendRequestContent. This event indicates that the content will be sent to the client. This provides an opportunity to modify the content before sending the message.
Error. This event indicates an outstanding exception.