ASP.NET Core: Global exception handler middleware
Middleware is a piece of software that handles requests and responses in the middle of application pipeline. An example of built-in ASP.NET Core middleware is authentication component and response caching component. In this article I’ll show you how to create global exception handler using custom middleware component. This article will teach you how to create global exception handler which will save each uncaught exception into file. Later on, you can also use it to send exceptions to 3-rd party service like Raygun (but it is not included in this how-to) or to do anything else you want with that exception. ...