Tag Archives

2 Articles

ASP.Net Core MVC request life cycle – Middleware Pipeline

Middleware Pipeline

ASP Net Core MVC is built on top of a concept called Middleware. Middleware pipeline is a chain of modular components that provide essential building block of how your application handles HTTP request. These components are generating a response for an incoming request directly or with help of a framework such as MVC.

Features like Routing, sessions, CORS, Authentication, Caching etc are implemented as middleware.

Example of asp net core middleware pipeline

Read More

ASP.Net Core MVC request life cycle – Overview

ASP.Net Core MVC request life cycle – Overview

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

Read More