|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ADSI ProblemHi
Can anyone tell me how I can check the status of an account in Active Directory using C#. I mean, I need to know whether, Account is locked, Password expired or Password needs to be changed at next logon, etc. The problem is that in all these cases, .Net throws a generic exception and there is no way for me to know what was the exact cause of the error. This is a little urgent. Thanks in advance Vikas Manghani >Can anyone tell me how I can check the status of an account in Active The problem is not .NET - it's LDAP. Whether your user logs in when>Directory using C#. >I mean, I need to know whether, Account is locked, Password expired or >Password needs to be changed at next logon, etc. The problem is that in all >these cases, .Net throws a generic exception and there is no way for me to >know what was the exact cause of the error. his account is disabled or he's locked out, or when his password is expired or an invalid password has been entered all result in the same error message. There's nothing you can do to change that, I'm afraid. You can check for "is that account disabled?" from an admin perspective - but the user logging on has no way of telling, sorry. Marc |
|||||||||||||||||||||||