-2

I'm trying to create a login page for my project in the company using the Active Directory accounts of my company. I'm trying to use the PrincipalContext() but tried to import it and error won't go away.

Is there any way to use PrincipalContext on c#? Tutorials and other source code in my company uses vb.net.

enter image description here

zhulien
  • 5,145
  • 3
  • 22
  • 36
Elijah Leis
  • 367
  • 7
  • 18

1 Answers1

0

It may not be installed on your system. For this

 1. Right Click Project. 
 2. Manage NuGetPackages.
 3. Search for System.DirectoryServices.I
 4. Install System.DirectoryServices.AccountManagement
Amit Verma
  • 2,450
  • 2
  • 8
  • 21