[英]MVC 5 app with Active Directory authentication failing Authorize attribute
I have an MVC 5 web app that is set up to use Forms authentication as per this this link 我有一个MVC 5 Web应用程序,该应用程序被设置为根据此链接使用表单身份验证
It is successfully validating against LDAP (ie, the call to Membership.ValidateUser(model.UserName, model.RememberMe)
returns true) but when it redirects to the Index action of my HomeController, it is hitting the [Authorize]
attribute and thinking that the user is not authorized for some reason, so it redirects to the login page again. 它已成功针对LDAP进行了验证(即,对
Membership.ValidateUser(model.UserName, model.RememberMe)
的调用返回true),但是当它重定向到HomeController的Index操作时,它击中了[Authorize]
属性并认为用户由于某种原因未获得授权,因此它将再次重定向到登录页面。
What am I missing here? 我在这里想念什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.