Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のように、global.asax.cs ファイルに HandleError 属性を登録すると、
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); }
それでも、すべてのコントローラーで HandlError 属性を指定する必要がありますか?
いいえ、あなたはしません。これがグローバル フィルターの要点です。
グローバル フィルターは、すべてのコントローラーのすべてのアクションに対して実行されます。
MSDN