---
title: "Discussion on \"Mocking ASP.NET MVC's ExceptionContext - aka How to mock global exception filter.\" | Hashnode"
description: "Discussion on \"Mocking ASP.NET MVC's ExceptionContext - aka How to mock global exception filter.\". The Challenge\nRecently at work, I implemented a global exception filter using ASP.NET MVC (System.Web.Mvc) that implements IExceptionFilter to capture and handle any uncaught exceptions. I'm a big fan of this approach for APIs because it allows excep..."
url: "https://hashnode.com/posts/mocking-aspnet-mvcs-exceptioncontext/697c1eeb125b55e9eaf03815"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Mocking ASP.NET MVC's ExceptionContext - aka How to mock global exception filter.](https://quangphan.hashnode.dev/mocking-aspnet-mvcs-exceptioncontext?utm_source=hashnode&utm_medium=feed)

The Challenge Recently at work, I implemented a global exception filter using ASP.NET MVC (System.Web.Mvc) that implements IExceptionFilter to capture and handle any uncaught exceptions. I'm a big fan of this approach for APIs because it allows excep...

Jan 30 · 3 min read · quangphan.hashnode.dev  
Updated Feb 5  
Read the article

-   [#csharp](https://hashnode.com/tag/csharp)
-   [#net](https://hashnode.com/tag/net)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)

## Written by

[Quang Phan](https://hashnode.com/@qphan613)

@qphan613 · Ontario, CA

  
[View profile](https://hashnode.com/@qphan613)

.net dev

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
