How do I achieve authorization with MVC asp.net?
C# – ASP.NET MVC Authorization
asp.net-mvcauthorizationc++
Related Question
- C# – How to create a dropdownlist from an enum in ASP.NET MVC
- C# – How to handle multiple submit buttons in ASP.NET MVC Framework
- Asp.net-mvc – How to render an ASP.NET MVC view as a string
- C# – How to get the client’s IP address in ASP.NET MVC
- C# – File Upload ASP.NET MVC 3.0
- .net – Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction
- Asp.net-mvc – ViewModel in MVC
- C# – How to create a custom AuthorizeAttribute in ASP.NET Core
Best Solution
Use the Authorize attribute
You can also use this on the controller. Can pass in users or roles too.
If you want something with a little more control, you could try something like this.