-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Why LdapException.ServerErrorMessage is empty on Linux? #70210
Copy link
Copy link
Closed
Labels
area-System.DirectoryServicesenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsneeds-author-actionAn issue or pull request that requires more info or actions from the author.An issue or pull request that requires more info or actions from the author.no-recent-activity
Milestone
Metadata
Metadata
Assignees
Labels
area-System.DirectoryServicesenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsneeds-author-actionAn issue or pull request that requires more info or actions from the author.An issue or pull request that requires more info or actions from the author.no-recent-activity
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
I have a simple LDAP connector in my app that currently works with System.DirectoryServices.Protocols 6.0.1 nuget package. When I call Bind() with incorrect credentials, I expect that in LdapException.Server ErrorMessage will be a string like "8009030C: LdapErr: DSID-0C09058A, comment: AcceptSecurityContext error, data 52e, v4563" (checked with a sniffer, it comes from the server). And it's empty! Everything is OK on Windows, the error is empty in Linux.
tcpdump (on linux):

Reproduction Steps
Work with Windows Active Directory
LDAP client on Debian 10
dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.5 [/usr/local/bin/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/bin/shared/Microsoft.NETCore.App]
Sample code:
How to receive ServerErrorMessage? Or how to receive LDAP sub code?