public class MyAuthorizeAttribute : AuthorizeAttribute
{ protected override bool AuthorizeCore(HttpContextBase httpContext)
{ //return base.AuthorizeCore(httpContext);
return DateTime.Now.Minute % 2 == 0
} protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext)
{
filterContext.HttpContext.Response.Redirect("/Customer/Login"); //base.HandleUnauthorizedRequest(filterContext); }
}用asp.net mvc的方法好象不行啊。指点一下呗
目前暂无任何回答
- 0 回答
- 0 关注
- 2861 浏览
添加回答
举报
0/150
提交
取消