2010-09-14 6 views
2

Pourquoi le code suivant verrouille-t-il le compte après une tentative infructueuse lorsque la stratégie dans AD est définie sur trois tentatives? Existe-t-il une meilleure façon de vérifier les informations d'identification par programme contre AD.Répertoire actif - vérification par programme des informations d'identification fournies

private bool Authenticate(string userName, 
    string password, string domain) 
{ 
    bool authentic = false; 
    try 
    { 
     DirectoryEntry entry = new DirectoryEntry("LDAP://" + domain, 
      userName, password); 
     object nativeObject = entry.NativeObject; 
     authentic = true; 
    } 
    catch (DirectoryServicesCOMException) { } 
    return authentic; 
} 

fonctionne bien lorsque les informations d'identification correctes sont entrées ...

Merci,

Répondre

Questions connexes