简体   繁体   中英

Active Directory logon doesn't work on XP

I have some code which queries the AD for a users information. On Windows 7 this works as expected but on XP it returns the error:

Logon failure: unknown user name or bad password

This seems to be across the board on XP machines, except the development was done on XP and tested on a different XP machine and they were fine. I don't have access to these 2 machines anymore so I can't test to see if it still works on them.

I don't know if it is a problem because of XP or a different reason but all I know is it doesn't work and XP seems to be the common denominator.

The error is thrown at this line:

Dim entry As DirectoryEntry = New DirectoryEntry("LDAP://ldapString", "username", "password")

As I say, this works on 7 but not on XP, it also works when logging in through ADExplorer. What could possibly be the problem?

Believe it or not we seem to have been given the wrong username...Changing the username has fixed the issue, although we were told that the username we were using doesn't even exist, so they don't know how even some of us were able to access the AD. But it's fixed now anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM