Should you use the method Application_Error in your global.asax in ASP.NET MVC?
问题 I know that in ASP.NET people typically put a protected method called "Application_Error" in their global.asax file inorder to handle say, logging of exceptions. My question is, is this an ASP.NET only thing, or does it work equally well in ASP.NET MVC? Is it an ASP.NET MVC best practice or not? 回答1: You should be using the Exception Filter to handle exceptions in your controllers. You do this by adding the [HandleError] attribute to the controller action. Further information can be found at: