ASP.NET MVC学习(3)过滤器Filter
序言
[HttpPost, Route("pushdata"), App_Start.ActionFilter]
Global文件中注册RegisterGlobalFilters(GlobalFilters.Filters);
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); //注册全局过滤器 filters.Add(new MessageConsumerHandleErrorAttribute()); }
资料
http://www.cnblogs.com/yaopengfei/p/7910763.html
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); //注册全局过滤器 filters.Add(new MessageConsumerHandleErrorAttribute()); }