Friday, March 2, 2012

ASP.NET Pipeline for MVC

  1. Request comes in to /Home.
  2. IIS determines the request should be handled by ASP.NET.
  3. ASP.NET gives all HttpModules a chance to modify the request.
  4. The UrlRoutingModule determines that the URL matches a route configured in the application.
  5. The UrlRoutingModule gets the appropriate IHttpHandler from the IRoute-Handler that is used in the matching route (most often, MvcRouteHandler) as the handler for the request.
  6. The MvcRouteHandler constructs and returns MvcHandler.
  7. The MvcHandler, which implements IHttpHandler, executes ProcessRequest.
  8. The MvcHandler uses IControllerFactory to obtain an instance of IController using the "controller" to route data from the route {controller}/{action}/{id}.
  9. The HomeController is found, and its Execute method is invoked.
  10. The HomeController invokes the Index action.
  11. The Index action adds objects to the ViewData dictionary.
  12. The HomeController invokes the ActionResult returned from the action, which renders a view.
  13. The Index view in the Views folder displays the objects in ViewData.
  14. The view, derived from System.Web.Mvc.ViewPage, executes its Process-Request method.
  15. ASP.NET renders the response to the browser.

No comments:

Check This Out!

More Links to Good Information