Articles → ASP .NET MVC → Page Lifecycle Of Asp.Net Mvc Application
Page Lifecycle Of Asp.Net Mvc Application
Concepts
- Routes table – Route table stores routes information of the application.
- Request context object - Request context encapsulates information about the http request.
- MVC controller factory – It maps the incoming request to the appropriate controller.
ASP.NET MVC Life Cycle
- A request is raised to the server (RequestContext ).
- URLRoutingModule intercepts the request, checks the route table and finds the matching route.
- Once the matching route is found, request goes to the MVCRouteController.
- MVCRouteHandler identifies the instance of MVCHandler.
- MVCHandler checks the MVC controller factory and gets the instance of the controller.
- Controller instance identifies the action method using IActionInvoker.
- IActionInvoker calls the execute method to execute the action method.
- After the execution is done, ActionResult is returned as response.
- The response is send back to the client.