objLoginSuccess = objNameSpace.OpenDSObject(
LoginInfo.Password, 0) But I do not want to use ADSI. I am trying to use the DirectoryServices class. But the login fails when I try to use the same LDAP string as above.DirectoryEntry entry = new DirectoryEntry(LDAP, domainAndUsername, password);
What should be my LDAP string in the above Statement? The LDAP connection string used in the ADSI works but the same connection string fails when I try to use it through the DirectoryServices. The exact problem is as follows.I need to search usernames on the root level. I can do that using ADSI. But the Directoryserves works only if I provide the child domain name. So why does that happen?