Enabling and using Role Management in MVC5

11,137

Solution 1

Thanks God I found what I am looking for at this awesome website http://typecastexception.com/post/2013/11/11/Extending-Identity-Accounts-and-Implementing-Role-Based-Authentication-in-ASPNET-MVC-5.aspx Thanks to the author John Atten

Solution 2

I'm glad you posted here. John (sadly) closed comments on that blog. I followed it and after spending a whole day on it, I found it just doesn't work as-published. The biggest problem I saw is that you will likely get a "no key defined" error on SelectRoleEditorViewModel. This happened when I tried to scaffold an empty view as well as when I tried to create a new migration against the database.

If anyone has comments, let's use this forum to discuss them! My solution is now working but I had to make a number of tweaks in order to get it to the finish line...

Share:
11,137
Admin
Author by

Admin

Updated on June 25, 2022

Comments

  • Admin
    Admin almost 2 years

    I am new to MVC. I setup a basic MVC5 Web Application with authentication. I observed that when I run the program the first time, it has register and login. So i registered and login but found no means to setup role management, because I thought i will find menu there like MANAGE ROLES. How am i going to enable, create, and use the role management?

  • Gawie Greef
    Gawie Greef over 7 years
    Brilliant article