摘要: ASP.NET MVC4 程序发生异常时,通过拦截Action的异常,重写ActionFilterAttribute 的方法OnActionExecuted实现。具体实现代码如下: /// /// 拦截Action的异常 /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] public class ExceFilterAttribute : ActionFilterAttribute { public ov... 阅读全文
posted @ 2013-08-21 17:22 科睿思博 阅读(640) 评论(1) 推荐(0) 编辑
摘要: 在ASP.NET MVC4 中继承ActionFilterAttribute 类,重写OnActionExecuting方法/// /// 权限拦截 /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] public class PermissionFilterAttribute : ActionFilterAttribute { /// /// 权限拦截 /// //... 阅读全文
posted @ 2013-08-21 16:38 科睿思博 阅读(1113) 评论(3) 推荐(0) 编辑