Maruf
Maruf

Reputation: 83

How to use autentication with roles on ASP.NET MVC

I have a question for all the ASP.NET veterans, I'm currently working on a project involving displaying different pages to users with different roles. For example, Admin Can add new users to the website Role-x users can edit the database A Role-y users can edit database A & B Role-Z users can access views of database B so my question is how can I implement this (serving different pages to different users based on their credentials(Roles)). I just need a little guide to what I have to implement. Thanks in advance.

Upvotes: 0

Views: 55

Answers (1)

B.S.
B.S.

Reputation: 678

Here you can found some good tutorials about authentication and authorization, please check it :

Introduction to ASP.NET Identity

A better way to handle authorization in ASP.NET Core

and here some more simple approach:

Role Based Authentication In ASP.NET MVC

If your question is more about Database please add the corresponding Tag.

Edit:

Here one more link that I highly suggest you, it explain step by step how to implement very clearly, there is example (4 tutorials) from Authentication and Authorization in MVC until Role-Based :

Authentication and Authorization in MVC

Upvotes: 1

Related Questions