In order to perform this operation a successful bind must be completed on the connection
See original GitHub issueDescribe the bug
During Bind error out "LdapForNet.LdapOperationsErrorException: Operations error. 000004DC: LdapErr: DSID-0C0907E9, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580. Result: 1. Method: ldap_parse_result. Details: ErrorMessage: 000004DC: LdapErr: DSID-0C0907E9, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580\n
To Reproduce Write a .net core 3.1 app to query for a CN based resource - on BIND it is breaking on server container where as working fine in local docker Linux container
Expected behavior Bind should be successful
Desktop (please complete the following information):
- OS: [e.g. iOS] LINUX Docker container
- Library version [e.g. 2.3] 2.7.11
- .NET\core\mono version [e.g. 4.6, 3.1] .net core 3.1
- LDAP server [e.g. Active Directory, OpenLdap] AD
Additional context I have tested same code in local with Docker Linux container which worked just fine but when deployed on server and ran API it throw above error - curious to know what is happening. I am using SIMPLE authentication method using credentials.
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (8 by maintainers)
Top GitHub Comments
Same issue here. What I’ve observed by debugging into the LdapConnection class is that the search I’m doing actually succeeds, but comes back with the operations error.
The exception is thrown by
ThrowIfResponseError()
once it pulls out the response code, even though there are entries returned by the search. I would like to be able to follow the earlier suggestion of checking the return count of records, but clients don’t get the chance since the exception happens first.Update: Turns out changing the port on
Connect()
from 389 to 3268 made all the difference. With that change, it’s working.Also try to use Global Catalog https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc978012(v=technet.10)