ASP.NET Core – How to add your own middleware function

Middleware functions have access to requests before they are sent to the controllers. Likewise, they have access to responses from the controllers before they are returned to the client. This is useful for doing things like logging the request and response, generating stats about requests, handling exceptions, and many more scenarios. In this article, first … Read more