Active Directory Authentication

Hi Folks,

I have created a NuGet package for .NET applications, using which, we can implement the LDAP\domain authentication.

Pre-requisite

  • .NET Framework 4.5

 How to use in the project

  1. Install nuGet package offline
  2. Create a new project.
  3. Add this package from NuGet Manager.
  4. It will add the required settings in configuration file of the project.
  5. Here is the sample code to use the library.
  1. static void Main(string[] args) {  
  2.     Console.WriteLine($ "Please enter userId...");  
  3.     var userName = Console.ReadLine();  
  4.     Console.WriteLine($ "Please enter password...");  
  5.     var password = Console.ReadLine();  
  6.     var user = new ActiveDirectoryHelper().AuthenticateUser(userName, password);  
  7.     if (user != null) {  
  8.         Console.WriteLine($ "Display Name : {user.DisplayName}");  
  9.     }  
  10.     Console.ReadLine();  
  11. }  
Ebook Download
View all
Learn
View all