2013-0502

首先FilterConfig添加

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
    filters.Add(new CustomHandleErrorAttribute());
}


自定义HandleErrorAttribute如下:

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true) 阅读全文>>
                
标签: HandleErrorAttribute MVC4 CustomHandleErrorAttribute 阅读:13312