Getting Unknown error (0x80005000) with Directory services in asp .net, IIS 8 environment

0

Error is happening in the code shown here.

I tried the following based on google research, but still error persists

  1. Ensured "LDAP" is in upper case
  2. Installed II6 meatabase 6.

Error goes off if Application pool or IIS is restarted. But after a day, it comes back. any help is appreciated.

DE = new DirectoryEntry("LDAP://iaai.com/DC=iaai,DC=com");

AdSearch = new DirectorySearcher(DE);
AdSearch.Filter = string.Format("(&(objectClass=user)(objectCategory=user) (sAMAccountName={0}))", sAcct);
AdSearch.PropertiesToLoad.Add("userprincipalname");
AdResult = AdSearch.FindOne();
asp.net
iis-8
directoryservices
directorysearcher
asked on Stack Overflow Oct 22, 2020 by djkumar72 • edited Oct 22, 2020 by marc_s

1 Answer

0

Error 0x80005000 may be caused by permission issues, Plus the parameters for the user name and password should be set to string or "Nothing" and not nothing.

DE = new DirectoryEntry("LDAP://iaai.com/DC=iaai,DC=com", userName, password);
answered on Stack Overflow Oct 23, 2020 by samwu

User contributions licensed under CC BY-SA 3.0