Last post May 13, 2021 06:23 AM by ChaoDeng
May 12, 2021 12:57 PMemail@example.com|LINK
i have asp.net core web application with .net 5. mentioned that its windows authentication in
now, my doubt its, i wish to grant permission to few users only so, may i know how do i configure few usernames only?
May 12, 2021 02:33 PM|bruce (sqlwork.com)|LINK
See this thread
May 13, 2021 06:23 AM|ChaoDeng|LINK
You can use the Role-based authorization method to access different controllers for roles with different permissions.
[Authorize(Roles = "Administrator")]
public class AdministrationController : Controller
In this way, only users who are members of the Administrator role can access the AdministrationController to perform any operations.
For more operations, please refer to Role-based authorization in ASP.NET Core.