'Log commands that are sent to the LDAP server
We are using .NET Core 3.1 and Novell.Directory.Ldap.NETStandard 3.4.0 to authenticate users against LDAP server. This is the code that we use:
public PasswordVerificationResult Login(string username, string password)
{
using (var connection = new LdapConnection { SecureSocketLayer = true })
{
connection.Connect("LDAP URL", 636);
connection.Bind($"COMPANY\\{username}", password);
if (connection.Bound)
{
return PasswordVerificationResult.Success;
}
}
return PasswordVerificationResult.Failed;
}
For debug purposes, we would like to see commands which were generated by Novell library and sent to LDAP server (ex. (&(USER=Uname)(PASSWORD=Pwd))). Can we log them somehow?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
