Skip to content

Unknown authentication method. SASL(-4): no mechanism available: No worthy mechs found. Result: -6. Method: BindSasl #183

@yihango

Description

@yihango

Describe the bug
error:

LdapForNet.LdapException: Unknown authentication method. SASL(-4): no mechanism available: No worthy mechs found. Result: -6. Method: BindSasl
   at LdapForNet.Native.LdapNative.ThrowIfError(SafeHandle ld, Int32 res, String method, IDictionary`2 details)
   at LdapForNet.LdapConnection.Bind(LdapAuthType authType, LdapCredential credential)
   at LdapTest.LdapForNetHelper.Ldap2(String domainIp, String domain, String userName, String pwd, String searchFilter) in D:\dev\staneee\ldap-test\LdapTest\LdapForNetHelper.cs:line 43
   at LdapTest.LdapForNetHelper.Run() in D:\dev\staneee\ldap-test\LdapTest\LdapForNetHelper.cs:line 20

dockerfile

FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal AS base

RUN apt-get update \ 
    &&apt-get install -y --no-install-recommends libldap-2.4-2 \
    && apt-get install -y --no-install-recommends libldap-common \
    && ln -s -f /usr/lib/x86_64-linux-gnu/libldap-2.4.so.2 /usr/lib/ldap.so.2 \
    && ln -s -f /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 /usr/lib/lber.so.2

To Reproduce
image

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: docker ubuntu 20/04
  • Library version: 2.7.15
  • .NET\core\mono version: net6.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions