Role Management in ASP MVC 5 (Microsoft.AspNet.Identity)

后端 未结 2 817
無奈伤痛
無奈伤痛 2021-02-10 10:50

in ASP MVC5 RC I didn\'t get the role system to work. My database has all needs tables an role exist but proofing if user is in role always return false (no SQL exception or som

2条回答
  •  忘了有多久
    2021-02-10 11:06

    I'm trying to understand how to use roles in MVC 5 myself, which is what brought me here. I can't answer your question, but check out this link. The downloaded solution works right out of the box and I've already been able to cut-and-paste some of the code and get it working in my own app. Now I'm trying to fully understand what it's doing.

    http://www.typecastexception.com/post/2013/11/11/Extending-Identity-Accounts-and-Implementing-Role-Based-Authentication-in-ASPNET-MVC-5.aspx

    It may not answer your question but at least it's a fully working solution that actually does work as described without a lot of hassle, so it's a good starting point.

提交回复
热议问题