摘要: 本文主要介绍在IIS5.1、IIS6.0、IIS7.5中安装配置MVC 3的具体办法! 阅读全文
posted @ 2012-05-21 16:44 dotNet修行之路 阅读(3586) 评论(2) 推荐(1) 编辑
摘要: 其实大家可以先去体验下VS2011了……(*^__^*) 嘻嘻 下载地址:http://www.microsoft.com/visualstudio/11/zh-cn/downloads 阅读全文
posted @ 2012-05-21 16:31 dotNet修行之路 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 新建一个类BaseController,这个类继承Controller类.并重写Controller里的OnActionExecuting函数: protected override void OnActionExecuting(ActionExecutingContext filterContex 阅读全文
posted @ 2012-05-21 15:41 dotNet修行之路 阅读(2231) 评论(2) 推荐(0) 编辑
摘要: 使用任一种方式后,我们就可以在 Controller 中使用 AuthorizeAttribute 实现基于角色的权限管理了: <!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> 阅读全文
posted @ 2012-05-21 14:24 dotNet修行之路 阅读(998) 评论(0) 推荐(0) 编辑
摘要: 嘿嘿!今天看见同事在搞MVC3的权限验证,以前不是很懂MVC3,自己研究了一下。希望对跟我一样的菜鸟童鞋有点点点帮助吧! public class RoleFilter : FilterAttribute, IAuthorizationFilter { #region IAuthorizationF 阅读全文
posted @ 2012-05-21 14:07 dotNet修行之路 阅读(1892) 评论(0) 推荐(0) 编辑
摘要: public static class PredicateBuilder { public static Expression<Func<T, bool>> True<T>() { return f => true; } public static Expression<Func<T, bool>> 阅读全文
posted @ 2012-05-21 11:19 dotNet修行之路 阅读(349) 评论(0) 推荐(0) 编辑