title: AD operation with system::directoryservices fails with LDAP error 82
body: <p>We have a C++/cli library which is performing a number of AD operations (unlock/password set/group lookup etc) this was written with a combination of directoryservices(direct ldap modifications for password set/reset so we could ensure Kerberos auth) and directoryservices::acountmanagement (for the auth and group membership).</p>
  
  <p>On our dev server all behaves as expected, however moving this to the prod server any operation which is using directoryservices to create an LDAP bind is failing with LDAP error 82. When we run Microsoft network monitor we can see the dev server is using activeds.dll and the failing prod server is using ntdsapi.dll.</p>
  
  <p>Our currently thinking is something in the name resolution for the production server as both were failing until we added the domain controller to the hosts file (after this was removed the accountmanagement calls continued to succeed)</p>
  
  <p>Does anyone know more any detail on the cause of  LDAP 82 (local error)?</p>
  
  <p>What would cause the switch between the activeds and ntdsapi libraries at run-time?</p>