Authentication and Authorization in Asp.Net Core

Joe Green 146 Reputation points
2022-11-18T20:54:47.127+00:00

I'm trying to develop a Asp.Net Core 6 MVC application that will have a login screen with three form fields - domain (drop down list with 5 domains), username and password. User will be authenticated against LDAP. After authentication, user will be authorized based on their role - admin, manager or non-admin. I would like to use Identity. This application will be hosted on IIS on Windows 2012 R2 server.

Since this is my first application using Asp.Net Core, I feel lost. Please advise articles or documentation to achieve the above using Visual Studio 2022. I plan on using Visual Studio 2022 and C# for development.

What type of authentication type (None, Windows authentication, MS Identity Platform) should I choose in Visual Studio 2022 when using Asp.Net Core Web Application template?

Thank you in advance for your time and advice.

Developer technologies | ASP.NET | ASP.NET Core
0 comments No comments
{count} votes

Accepted answer
  1. AgaveJoe 30,126 Reputation points
    2022-11-18T22:38:20.797+00:00

    This is custom code. Use the cookie authentication middleware to cache the user's identity and any other information your application needs to authorize users. It's up to you to write the login HTML and code to authenticate using LDAP. The cookie authentication middleware works with the standard authorization features in ASP.NET Core.

    Use cookie authentication without ASP.NET Core Identity
    Introduction to authorization in ASP.NET Core
    LDAP authentication in ASP.NET Core MVC

    https://www.google.com/search?q=.net+core+ldap

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.