【发布时间】:2012-09-18 14:28:59
【问题描述】:
我最近开始将 ASP.Net MVC 2 项目迁移到 MVC 4。现在似乎一切正常(据我目前所知),除了我的自定义授权属性,这个根本没有被调用。
类
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class Authenticated : AuthorizeAttribute
示例用法
[Authenticated]
public ActionResult ChangePassword(string password)
有什么变化吗?我错过了什么?
编辑
如果没有调用 Attribute 方法 self 时,我该如何调试?
【问题讨论】:
标签: asp.net asp.net-mvc-4