Overview of Platform changes
In the past version of ASP.Net, Web forms and MVC used to share the underlying infrastructure. In .Net core these platforms are unified into one MVC. The Webforms is not part of ASP.NET core anymore.

The prior versions of ASP.NET MVC used to provide an underlying application life cycle events based on HTTP modules & handlers and IIS hosting and application level events . Http Events and Handlers are not existing in ASP.NET Core.

Most of the events and functionality are provided in ASP.Net core by middleware.

What is life cycle
A Series of components, events or stages of an application that processes a request or respond to user interaction. In MVC the request life cycle refers to all of the components and stages that interact to process an HTTP request.

Following diagram shows an overview of ASP.Net core MVC application.

Asp.Net Core MVC Life cycle overview

The detailed explanation of each stage in the ASP.Net core MVC application is little big to include in one post, I’ll create a separate post with examples and documentation for each stage. Click on each title to read more about them.
1. Middleware
Middleware is a basic building block of application’s HTTP Pipeline. Such as Serve files, route requests etc.
[Read more …]

2. Routing
The routing middleware act as a gateway into the MVC application. The class MVC RouteHandler is used to handle routes to match the routes within MVC Application.

  • Routing Middleware
  • MVC Route Handler

[Read more …]

3. Controller Initialization
Route data obtained from routing module converted into a concrete controller that can handle the request. This is achieved through Controller factory and Controller Action Invoker.

  • Controller Factory
  • Controller Action Invoker

[Read more …]

4. Execute Action method
The component called Action invoker binds and selects an appropriate action method within the controller. Following action will take place within this stage.

  • Model binding
  • Binds additional information from HTTP request into Action method’s parameters.

  • Action filters
  • Action execution
  • Action Filters
  • Action Result

[Read more …]

5. Result Execution
After the Action result is prepares, if the result is View Result View Engine will be called

  • Result Filters
  • Invoke Action Result
  • Result Filters

[Read more …]

6. Render view
Is responsible for rendering view sending the rendered view in HTTP response.
[Read more …]

7. Data Result
Is responsible for sending the generated result in HTTP response. For example a JSON or XML response.
[Read more …]