Home > Mobile >  Adding roles to existing ASP.NET Core Web Application
Adding roles to existing ASP.NET Core Web Application

Time:10-24

I have created a document upload site with ASP.NET Core Web Application, and I selected the authentication as Individual Accounts, but I want to be able to add roles to the users.

How I want it to work is, a superuser will create admin users, and admins will create normal users, and when creating a user I want to be able to select a role, but I don't think this is included in the basic Individual Accounts authentication.

Most articles/questions I've looked at reference using the startup class or controllers and my application doesn't have either of these. It just has Models and Razor pages - with Page models behind.

How can I add this in?

CodePudding user response:

After some digging I found this article which gives the exact steps to add in Roles and solved my issues!

https://www.c-sharpcorner.com/article/adding-roles-to-registration-razor-page-in-asp-net-core-razor-pages-web-applicat/

  • Related