Hi Team
I want to find out some examples, i am building Asp.net MVC using C# on 4.7.net framework. Using Identity without authentication on Windows, but using Active Directory, e.g As an Administrator during form registration i must be prompt dynamically with my username from AD account, then redirect to the dashboard(View.cshtml) where i can perform CRUD operation for new users. Are there any examples i can relate i want to accomplish something along this line for our in house project.
Guest UserPosted Mar 8, 2024, 8:53 AM
Hi Jaraj
Let me share my current logic, because i am now getting 401 Unauthorized. Maybe i am missing something, username and password are correct i am using them for our AD account.
// web.config
Jayraj ChhayaPosted Mar 8, 2024, 7:38 AM
To achieve user identity integration with Active Directory in an ASP.NET MVC application, you can leverage Windows Authentication and the
System.DirectoryServices.AccountManagementnamespace in C#. Here's a high-level overview of the steps involved:PrincipalContextto interact with Active Directory for user information.While there might not be a specific example that matches your exact requirements, you can refer to Microsoft's documentation on Windows Authentication in ASP.NET and the
System.DirectoryServices.AccountManagementnamespace for guidance. Additionally, you can adapt and customize existing examples to suit your specific needs for the in-house project.