简体   繁体   中英

Help with Authorize(Roles=)] MVC 3 Windows Authentication

I am having problems with Authorize attribute in MVC 3 with Windows Authentication. When I decorate a controller with the [Authorize] attribute a specify a role, the Authorization always returns false when I know the user is a member of the role I specified. Am I missing something? Does anybody have some examples of how they used [Authorize] attribute in MVC 3 with Windows Authentication? Thanks for the help......

[Authorize(Roles = "Admin")]

Should be enough

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM