HTTPModule Event Execution Order?
HTTPModule Event Execution Order?
Does anyone know of a site or page, or know the order of execution for the events of the HTTPApplication class for HTTPModule event execution?
I found the MSDN Documentation for all of the events, but it doesn't show a list of process steps and I haven't been able to find one.
回答1
Maybe this helps
http://support.microsoft.com/kb/307985/en-us/
An HttpApplication class provides a number of events with which modules can synchronize. The following events are available for modules to synchronize with on each request. These events are listed in sequential order:
- BeginRequest
- AuthenticateRequest
- AuthorizeRequest
- ResolveRequestCache
- AcquireRequestState
- PreRequestHandlerExecute
- PostRequestHandlerExecute
- ReleaseRequestState
- UpdateRequestCache
- EndRequest
The following events are available for modules to synchronize with for each request transmission. The order of these events is non-deterministic.
- PreSendRequestHeaders
- PreSendRequestContent
- Error
See the article for full info.
回答2
MSDN Library documentation:
- ASP.NET Application Life Cycle Overview for IIS 5.0 and 6.0
- ASP.NET Application Life Cycle Overview for IIS 7.0
Here are the events (in bold) and other steps in the request pipeline for ASP.NET 4.0:
- Validate the request, which examines the information sent by the browser and determines whether it contains potentially malicious markup.
- Perform URL mapping, if any URLs have been configured in the UrlMappingsSection section of the Web.config file.
- Raise the BeginRequest event.
- Raise the AuthenticateRequest event.
- Raise the PostAuthenticateRequest event.
- Raise the AuthorizeRequest event.
- Raise the PostAuthorizeRequest event.
- Raise the ResolveRequestCache event.
- Raise the PostResolveRequestCache event.
- [IIS 5.0/6.0] Based on the file name extension of the requested resource (mapped in the application's configuration file), select a class that implements IHttpHandler to process the request. If the request is for an object (page) derived from the Page class and the page needs to be compiled, ASP.NET compiles the page before creating an instance of it. [IIS 7.0] Raise the MapRequestHandler event. An appropriate handler is selected based on the file name extension of the requested resource. The handler can be a native-code module such as the IIS 7.0 StaticFileModule or a managed-code module such as the PageHandlerFactory class (which handles .aspx files).
- Raise the PostMapRequestHandler event.
- Raise the AcquireRequestState event.
- Raise the PostAcquireRequestState event.
- Raise the PreRequestHandlerExecute event.
- Call the ProcessRequest method (or the asynchronous version IHttpAsyncHandler.BeginProcessRequest) of the appropriate IHttpHandler class for the request. For example, if the request is for a page, the current page instance handles the request.
- Raise the PostRequestHandlerExecute event.
- Raise the ReleaseRequestState event.
- Raise the PostReleaseRequestState event.
- Perform response filtering if the Filter property is defined.
- Raise the UpdateRequestCache event.
- Raise the PostUpdateRequestCache event.
- [IIS 7.0] Raise the LogRequest event.
- [IIS 7.0] Raise the PostLogRequest event.
- Raise the EndRequest event.
- Raise the PreSendRequestHeaders event.
- Raise the PreSendRequestContent event.
Note: The MapRequestHandler, LogRequest, and PostLogRequest events are supported only if the application is running in Integrated mode in IIS 7.0 and with the .NET Framework 3.0 or later.
官方的文档
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2019-07-17 Chrome Development Tool: [VM] file from javascript
2019-07-17 Forcepoint
2019-07-17 ASP.NET Web Optimization Framework
2017-07-17 常用快捷键
2017-07-17 Track Active Item in Solution Explorer
2015-07-17 Learning WCF Chapter2 Service Contracts
2015-07-17 Learning WCF Chapter2 WCF Contracts and Serialization