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. ...

Exception Handling in ASP.NET Core – Middleware vs Filters – What's Best?
Codewrinkles
26.0K views • Nov 6, 2022
Exception Handling in ASP.NET Core – Middleware vs Filters – What's Best?

About this video

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

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

26.0K

Likes

791

Duration

20:34

Published

Nov 6, 2022

User Reviews

4.6
(5)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.