slimbx
asked on
Active Directory Exceptions
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.
slimbx
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.
slimbx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ihenry,
My team and I have seriously exhausted that link that you sent. :) Thats a good thing, we just want to tak it to the next level. One thought that we had though, was installing Win 03 server, and trying to locate the MFC header file that stores the result information regaring ADSI. If that doesnt work, I am fearing the worst. REWRITE THE CODE!!!!!!!!!!!!!!!!!!!!!! !!
slimbx
My team and I have seriously exhausted that link that you sent. :) Thats a good thing, we just want to tak it to the next level. One thought that we had though, was installing Win 03 server, and trying to locate the MFC header file that stores the result information regaring ADSI. If that doesnt work, I am fearing the worst. REWRITE THE CODE!!!!!!!!!!!!!!!!!!!!!!
slimbx
ASKER
ihenry, since you were the first to respond and the mediators are going to abandon my account, I thought you deserve the points. Thanks for your help.
slimbx
slimbx
ASKER
-slimbx-