ASP.NET MVC - Life Cycle

MVC has two life cycles −
  • The application life cycle
  • The request life cycle


The Application Life Cycle

The application life cycle refers to the time at which the application process actually begins running IIS until the time it stops. This is marked by the application start and end events in the startup file of your application.

The Request Life Cycle

It is the sequence of events that happen every time an HTTP request is handled by our application.

The entry point for every MVC application begins with routing. After the ASP.NET platform has received a request, it figures out how it should be handled through the URL Routing Module.

All routes have an associated route handler with them and this is the entry point to the MVC framework.




The MVC framework handles converting the route data into a concrete controller that can handle requests. After the controller has been created, the next major step is Action Execution. A component called the action invoker finds and selects an appropriate Action method to invoke the controller.

If the result is not a view, the action result will execute on its own. This Result Execution is what generates an actual response to the original HTTP request.