Hello there experts,
I have a question about active directory and the exceptions that can be thrown when an error or errors occur when trying to login to active directory passing a username and password, valid or not. The reason why I am looking for a list of the possible exceptions is because currently, the code that we have in VB.NET (which unfortunetly I cannot post, against company policy and I am being monitored), actually takes a username and password and tries to authenticate it with Active Directory. Basically what is being returned is a COMException, anytime that there is an error that has occurred. My initial thought is that the code that comprises Active Directory is not .NET compliant yet, thus is not throwing exceptions but regular old errors. Plus, in our login script, we want to be able to track any exceptions or errors that occur, so that we can handle them appropriately. An example of this is if a person provide a valid username and password, but their account is about to expire, we will receive the COMException, which basically is returning that the password is about to expire, but the login was successful. We do not want to not allow the user to login to our app just because their password is about to expire.
So what I am looking for, if possible, is a list of possible Active Directory exceptions that can be thrown; or a way to suck out the actual cause of the exception out of the basic COMException being returned back. My team and I have been unable to find any documentation on how to find any of this info, so I am leaving it to the experts. Thanks in advance for the help and patience.