Bonjour,
je suis en train d'essayer de faire une authentification avec un annuaire ldap...
jusqu'ici tout va bien plein d'exemples de codes a droites a gauches...
mais le pb est je n'arrive pas a executer mon code:
et le message d'erreur est magnifiquement inutile....
qqn aurait-il déjà eu cette erreur j'ai déja fait ma petite recherche sur google mais ca n'a rien donné
Merci pour votre aide:
erreur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 DirectoryEntry LdapEntry = new DirectoryEntry(this._cheminLDAP); LdapEntry.AuthenticationType=AuthenticationTypes.SecureSocketsLayer; // on recherche la personne avec le nom et password DirectorySearcher LdapSearcher = new DirectorySearcher(); LdapSearcher.SearchRoot=LdapEntry; LdapSearcher.Filter="(&(objectClass=person) (cn=" + _nomLDAP + ")(userPAssword=" + _passLDAP + "))"; SearchResultCollection ListResultat = LdapSearcher.FindAll();
Unknown error (0x80005000)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unknown error (0x80005000)
Source Error:
// si plus de 1 elements trouvés alors OK
SearchResultCollection ListResultat = LdapSearcher.FindAll();
LdapEntry.Close();
if(ListResultat.Count>0)
Partager