ASP.NET Core 3.1 Concepts and Use Cases of Middleware Pipeline - Part 7
This is part 7 of the playlist. This tutorial discusses what middleware and middleware pipeline are all about. It brings up some key points about the middleware in the request-response scheme of things.
The lecture discusses that middleware is a C# class that accomplishes a functionality for an asp.net core 3.1 application. There are examples like logging, image resizing, authentication, authorization, routing, and many other middleware that are already built into the ASP.NET Core web framework. A middleware is termed a terminal middleware if it short circuits the rest of the middleware downstream and returns a response to the specific request which reverses the direction of flow. Also, the endpoint middleware is perhaps the most important of all the middleware as if the request reaches this middleware an html or web api response is generated by it and sent back to the ASP.NET core server. So all the html or web api responses are generated by endpoint middleware.
Also one piece of middleware after handling a request can add data to the request which could be used by the next piece of middleware. The authentication middleware checks for the user in a request and passes it on to the authorization middleware to determine if the request for that user can execute.
#aspnetcore31 #requestpipeline #middleware #middlewarepipeline #terminalmiddleware
Comments
Post a Comment