Tuesday, January 17, 2012

ASP.NET MVC Execution Process

1. Request to an ASP.NET MVC application first pass through the UrlRoutingModel, which is a HTTP Module.
2. This model parses the request and performs route selection.
3. This UrlRoutingModel selects the first route object that matches the current request.
4. If no routes found, the UrlRoutingModel does nothing and fall back the request to ASP.NET or IIS.
5. From the Route object, it obtains IRouteHandler that is associated with the Route object. In MVC, the instance of IRouteHandler is MVCRouteHandler.
6. IRouteHandler creates an instance of IHttpHandler object and passes it to IHttpContext object. In MVC, The instance of IHttpHandler is MvcHandler.
7. The MVCHandler object then selects the appropriate controller that will ultimately handle the request.

No comments:

Post a Comment