Using Middleware
Middleware is software you configure at the beginning of your application when the application starts. It’s important to note that the Middleware you add should be based on your application’s requirements. It’s not necessary to add every single component. Streamlining your Middleware pipeline is important, which we’ll discuss shortly.
It’s been said that the difference between a library and a framework is that a library is the code you call from your application, whereas a framework is structured a certain way to call your code. This is what Middleware has evolved into from earlier versions of ASP.NET.
In this section, we’ll present the common flow of a Middleware pipeline and how to control what happens in a middleware component. By the end of this section, you’ll understand how a middleware pipeline works.
Understanding the Middleware Pipeline
When your web application starts, Middleware is called and...