I am upgrading my ASP.NET Core RC1 application to RC2. I have some references to System.DirectoryServices
and System.DirectoryServices.AccountManagement
You can use LDAP client library for .NET Standard 1.3
Compatible .NET runtimes: .NET Core, .NET Framework 4.6, ...
It works against any LDAP protocol compatible directory server (including Microsoft Active Directory).
private static bool LoginLdap(string username, string password)
{
try
{
using (var conn = new LdapConnection())
{
conn.Connect("", 389);
conn.Bind(LdapConnection.Ldap_V3, $"\\{username}", password);
}
return true;
}
catch (LdapException)
{
return false;
}
}
For more info read this issue : Support for System.DirectoryServices
It works well for me. (in .NET Core 1.1.1)