Using SQL Server 2005, how can I authenticate a username/password pair against a non-AD LDAP server using NET ?
A:
If calling from SQL Server 2005, you'll need to create a .NET stored procedure.
Using .NET to connect to LDAP:
http://msdn.microsoft.com/en-us/library/system.directoryservices.aspx
using System.DirectoryServices;
DirectoryEntry DE = new DirectoryEntry(LDAPPath, LDAP_Domain + account, password, AuthenticationTypes.Secure);
if (DE == null)
{
// Login failure
}
Darryl Peterson
2009-10-16 18:52:05
Hi Darryl,Unfortunately, the System.Directory set of assemblies/services aren't available to SQL via the CLR services.
Alex Waddell
2009-10-16 21:08:01
You can access the assembly, but it considered an "Unsupported Library". I've included a couple of URLs about this.http://dbaspot.com/forums/ms-sqlserver/218655-system-directoryservices-allowable-clr.htmlhttp://msdn.microsoft.com/en-us/library/ms403279.aspx
Darryl Peterson
2009-10-18 20:00:06