I've followed the ADAM Step by Step Guide from Microsoft and setup an ADAM instance on my local machine. I'm attempting to authenticate using the "Mary Baker" account, but every time I get a COM exception on the if (entry.Guid != null)
line below. The exception states that there's an unknown user name or bad password.
However, I can use the ldp utility to connect to ADAM and successfully perform a simple bind - so I know that the user name both exists, and I have the correct password.
Additionally, I have set the msDS-UserAccountDisabled property on the user to false, and added the user to both the Administrators and Readers roles.
Any thoughts?
path = "LDAP://localhost:50000/O=Microsoft,c=US";
userId = "CN=Mary Baker,OU=ADAM users,";
password = "Mary@101";
DirectoryEntry entry = new DirectoryEntry(path, userId, password, AuthenticationTypes.None);
if (entry.Guid != null)
LoadWelcomeScreen();
Thanks.