Exception Handling in ASP.NET Core – Middleware vs Filters – What's Best?



Exception Handling in ASP.NET Core – Middleware vs Filters – What's Best?

Exception Handling in ASP.NET Core – Middleware vs Filters – What's Best?

When it comes to global exception handling in ASP.NET Core we have two major options: we either use an exception handling middleware or an exception filter. But what’s the best way to go? As almost always in programming, it depends. The most important thing is to understand how these approaches are different and take informed decisions. In this video I provide a theoretical and practical comparison between these two approaches. But, in the end, the decision is yours.
#AspNetCore #DotNetCore #dotnet

Join this channel to get access to perks:
https://www.youtube.com/channel/UCyTPru-1gZ7-4qblcKM0TiQ/join

VIDEO: FIlters in ASP.NET Core: https://youtu.be/moqsvpD07hQ

Contents
1. Intro: 00:00
2. Demo app overview: 01:41
3. The error contract: 03:00
4. Exception handler middleware: 04:55
5. Exception filter: 07:27
6. Theoretical difference between middleware and filter: 09:28
7. Practical differences: 11:10
8. Conclusion: 18:11

Comments are closed.