ASP.NET Application Life Cycle
2008-05-28 14:45
447 查看
Original Post at http://blogs.msdn.com/tom/archive/2008/05/27/asp-net-application-life-cycle.aspx
Validate the request – checking for malicious markup
Perform URL mapping
BeginRequest event
AuthenticateRequest event
PostAuthenticateRequest event
AuthorizeRequest event
PostAuthorizeRequest event
ResolveRequestCache event
PostResolveRequestCache event
Find the requested resource, if it is a Page, compile the page
PostMapRequestHandler event
AcquireRequestState event
PostAcquireRequestState event
PreRequestHandlerExecute event
Call ProcessRequest on the HttpHandler
PostRequestHandlerExecute event
ReleaseRequestState event
PostReleaseRequestState event
Response filtering
UpdateRequestCache event
PostUpdateRequestCache event
EndRequest event
PreSendRequestHeaders event
PreSendRequestContent event
Hopefully this will give you a little perspective on all of the different times that you can hook into a request and the different things you can act on. There are additional things you can do, such as Application_Start events in the global.asax file. For those and some nice pictures of some of the above data, take a look at the MSDN page here.
ASP.NET Application Life Cycle
Have you ever wondered about all the stages that an ASP.NET request goes through? Ever wonder why it is such a performance hit to have a wildcard mapping to map all extensions on your web server to ASP.NET? This information corresponds to IIS 5.0 and 6.0. For information on the life cycle in IIS 7.0, see ASP.NET Application Life Cycle Overview for IIS 7.0. You can also check out the ASP.NET Page Life Cycle Overview for information on what happens once a page is run.User requests a resource
A request comes into the web server and it will check to see what is mapped to handle the request. ASP.NET is an ISAPI extension under the web server.ASP.NET receives the first request for an application
ASP.NET will first create the application domain for this application. These allow each application to be isolated from each other. ASP.NET then compiles all the top-level items in the application, if required, including the App_Code folder.ASP.NET core objects created for the request
ASP.NET will create the Request, Response, and Context objects for the request. This includes browser information, cookies, headers and everything that the server will respond back to the client with.HttpApplication is assigned to the request
The application is started by creating the HttpApplication object, taking into account the Global.asax file if it exists. At this stage, ASP.NET will create any configured modules, such as SessionStateModule to handle Session.HttpApplication pipeline
The following events occur:Validate the request – checking for malicious markup
Perform URL mapping
BeginRequest event
AuthenticateRequest event
PostAuthenticateRequest event
AuthorizeRequest event
PostAuthorizeRequest event
ResolveRequestCache event
PostResolveRequestCache event
Find the requested resource, if it is a Page, compile the page
PostMapRequestHandler event
AcquireRequestState event
PostAcquireRequestState event
PreRequestHandlerExecute event
Call ProcessRequest on the HttpHandler
PostRequestHandlerExecute event
ReleaseRequestState event
PostReleaseRequestState event
Response filtering
UpdateRequestCache event
PostUpdateRequestCache event
EndRequest event
PreSendRequestHeaders event
PreSendRequestContent event
Hopefully this will give you a little perspective on all of the different times that you can hook into a request and the different things you can act on. There are additional things you can do, such as Application_Start events in the global.asax file. For those and some nice pictures of some of the above data, take a look at the MSDN page here.
相关文章推荐
- ASP.NET Application Life Cycle
- ASP.NET application and page life cycle
- asp.net application life cycle
- NOP(三)-- ASP.NET Application Life Cycle
- ASP.NET HttpApplication HttpModule + Page Life Cycle Events Sequence Test
- ASP.NET 应用程序生命周期(ASP.NET Application Life Cycle)
- ASP.NET application and page life cycle
- ASP.NET application and page life cycle -2
- ASP.NET Application and Page Life Cycle
- ASP.NET Application, Page and Control Life Cycle
- ASP.NET Application Life Cycle Overview for IIS 5.0 and 6.0
- ASP.NET - Application Life Cycle Principle
- ASP.NET Application and Page Life Cycle
- Web Server and ASP.NET Application life Cycle in Depth [转]
- [ASP.NET] ASP.NET Application lifecycle
- asp.net Page lifeCycle
- ASP.NET Page Life Cycle Events
- Asp. net Appliction LifeCycle 转自:http://www.cnblogs.com/Laeb/archive/2006/12/06/584436.html
- Asp.net page lifecycle explain in msdn
- Page Life cycle methods in ASP.NET 2.0