1
Reply

Unable to Read values from LDAP

crmraj

crmraj

Sep 13 2004 6:09 PM
3.3k
Dear friends, I want to read values from LDAP server . I am using DirectoryEntry object in C# to connect. Below is the my example code try { DirectoryEntry de = new DirectoryEntry("LDAP://x.x.x.x/o=xyz","cn=admin","122222",AuthenticationTypes.Secure) ; DirectorySearcher src = new DirectorySearcher("(&(objectclass=*))"); src.SearchRoot = de; src.SearchScope = SearchScope.Subtree; foreach(SearchResult res in src.FindAll()) { MessageBox.Show(res.Properties["Name"][0].ToString()); } } catch (System.NullReferenceException ex) { MessageBox.Show(ex.Message.ToString()); } Note :x.x.x.x is LDAP IP address . When I Execute the program I getting following error Logon failure: unknown user name or bad password but same user id and password we use for some other third party tool to connect LDAP system ,it works fine .Our LDAP server is IBM Tivoli server . Can you please some one help me on this .. Thanks, crm Sorry by mistake I put it in Deployment section ..

Answers (1)