question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In order to perform this operation a successful bind must be completed on the connection

See original GitHub issue

Describe 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:open
  • Created 3 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
tom-weitzelcommented, Apr 12, 2021

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.

public DirectoryResponse SendRequest(DirectoryRequest directoryRequest)
{
    ThrowIfNotBound();
    var requestHandler = SendRequest(directoryRequest, out var messageId);
    var response = ProcessResponse(directoryRequest, requestHandler, messageId, CancellationToken.None);
    ThrowIfResponseError(response);
    return response;
}

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Bind for successful connection - command line
I am trying to test a connection to AD using OpenLDAP and this is what I ... In order to perform this operation...
Read more >
LDAP OU shows invalid bind credentials, but LDAP server ...
LDAP: error code 1 - 000004DC: LdapErr: DSID-0C090A4C, comment: In order to perform this operation a successful bind must be completed on the...
Read more >
A successful bind must be completed on the connection ...
I can connect to LDAP / retrieve results using ldapsearch ... In order to perform this operation a successful bind must be completed...
Read more >
Setting up LDAP connection between CentOS and ...
... In order to perform this operation a successful bind must be ... This connect using simple authentication ( -x ) to dc.example.com...
Read more >
LDAP connection problem - SonarQube - Sonar Community
when i try to connect it to my AD via LDAP connection seems OK, ... In order to perform this operation a successful...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found