I have a serious problem authenticating my user against AD. I can use the PrincipalContext way or the DirectoryEntry way and check whether login was successful or not. But this is not enough for my case. I need to know why authentication failed(eg: password expiration, account locked, bad password count limit). Is there anyway of achieving this without using native win32 dll's. By the way this may not be a web project all the time. My optimal solution could be a generic one. Thanks for any help...
1 に答える
1
例外でエラーの理由を取得する必要があります。
それにもかかわらず、次のようなPrincipalContextメンバーを使用して認証が失敗した場合に、情報を取得します。
- AccountExpirationDate(アカウントの有効期限が切れています)
- AccountLockoutTime(アカウントはロックされています)
- 有効(アカウントは有効)
- IsAccountLockedOut(アカウントはロックされています)
- PermittedLogonTimes(ユーザーは今すぐログインできます)
- PermittedWorkstations(このクライアントからのログインを許可されているユーザー)
于 2012-10-08T15:56:47.150 に答える