Groups | Blog | Home
all groups > dotnet framework > july 2006 >

dotnet framework : ADSI Problem


Vikas Manghani
7/28/2006 4:23:02 AM
Hi
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
Marc Scheuner
8/1/2006 3:23:45 PM
[quoted text, click to view]

The problem is not .NET - it's LDAP. Whether your user logs in when
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.

AddThis Social Bookmark Button