I need to login on LDAP on my Windows Server.
First of all do i need to have anything enabled on my DC?
Than my code for connecting look like this:
Console.WriteLine("Connect to LDAP mydomain");
Console.Write("Enter your username: ");
string username = Console.ReadLine();
Functions.maskInputString();
string password = Console.ReadLine();
DirectoryEntry directoryEntry = new DirectoryEntry("LDAP://mydomain", username, password)
Console.ReadKey();
Can i do like some conditions for DirectoryEntry directoryEntry = new DirectoryEntry("LDAP://mydomain", username, password)
If login was succesful or not?
Because now when i enter username and password i dont know if connection is established or not.
Thanks for answers.