Friday, July 16, 2010

An Overview of ASP.NET Architecture

Application Life Cycle Events

  • IIS Picks up the request

  • IIS looks for the server extension

  • If the extension is .aspx then IIS maps the request into aspnet_isapi.dll

  • aspnet_isapi.dll hosts an ASP.NET worker process that creates an HTTP Pipeline

  • The Http Pipeline object hosts objects like HttpRuntime, HttpApplicationFactory, and HttpWorkerRequest

  • The HttpApplicationFactory either creates a new HttpApplication or selects an existing one from the pool of applications

  • The appropriate PageHandlerFactory will be called



Page Life Cycle Events
The events that are executed in the life cycle of the page

  • Page_Init (Create Page Controls and initialize them)

  • LoadViewState (Restores the view state of the page)

  • LoadPostData (Populates the controls with previously posted data)

  • Page_Load (To bind data from database to controls)

  • RaisePostDataChangedEvent

  • RaisePostBackEvent (It is only raised if there is a postback)

  • Page_PreRender (Right before rendering)

  • SaveViewState

  • Page_Render

  • Page_UnLoad



ASP.NET ArchitectureWe can write custom handlers to override these events

Source
A Nice Article

No comments:

Post a Comment