I am binding to an ADAM instance from a C# client using the ADSI provider. When the bind fails I get a generic error condition back that indicates a failure. If I look at a network trace of the traffic I can see that the ADAM instance itself send extended error information back to my client indicating why this authentication has failed, but it seems that the ADSI provider discards this extended information and just provides me the fact that the bind failed.
For example, in a failed bind a COMException is thrown with an ErrorCode attribute that will always contain the value 8007052E. If I look at the network trace there are multiple reasons for the failure that LDAP is sending back and those could include errors for password expiration, account disabled, password invalid, user does not exist, etc.
Is there any way to get this extended error information using ADSI or the COMException object? If not, is there some other .NET provider that someone has used that is able to get this information?