From 9305c138eab659831c631845c0ff9dc2a6cd5e50 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Tue, 17 Jun 2025 21:01:42 -0700 Subject: [PATCH] Update filters.md Remove a faulty diagram --- aspnetcore/mvc/controllers/filters.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aspnetcore/mvc/controllers/filters.md b/aspnetcore/mvc/controllers/filters.md index 43ac08d5239d..8735f1c395b3 100644 --- a/aspnetcore/mvc/controllers/filters.md +++ b/aspnetcore/mvc/controllers/filters.md @@ -65,7 +65,11 @@ Each filter type is executed at a different stage in the filter pipeline: * Are **not** supported in Razor Pages. * Can be invoked on both actions and route handler-based endpoints. -* [Exception filters](#exception-filters) apply global policies to unhandled exceptions that occur before the response body has been written to. +* [Exception filters](#exception-filters): + * Apply global policies to unhandled exceptions that occur before the response body has been written to. + * Run after model binding and action filters, but before the action result is executed. + * Run only if an unhandled exception occurs during action execution or action result execution. + * Do not run for exceptions thrown during middleware execution, routing, or model binding. * [Result filters](#result-filters): @@ -73,10 +77,6 @@ Each filter type is executed at a different stage in the filter pipeline: * Run only when the action method executes successfully. * Are useful for logic that must surround view or formatter execution. -The following diagram shows how filter types interact in the filter pipeline: - -:::image source="~/mvc/controllers/filters/_static/filter-pipeline-2.png" alt-text="The request is processed through Authorization Filters, Resource Filters, Model Binding, Action Filters, Action Execution and Action Result Conversion, Exception Filters, Result Filters, and Result Execution. On the way out, the request is only processed by Result Filters and Resource Filters before becoming a response sent to the client."::: - Razor Pages also support [Razor Page filters](xref:razor-pages/filter), which run before and after a Razor Page handler. ## Implementation @@ -543,4 +543,4 @@ When passing an *instance* of a filter into `Add`, instead of its `Type`, the fi * :::moniker-end -[!INCLUDE[](~/mvc/controllers/filters/includes/filters7.md)] \ No newline at end of file +[!INCLUDE[](~/mvc/controllers/filters/includes/filters7.md)]