SQL Server LDAP身份验证

时间:2009-10-16 17:30:05

标签: .net sql-server ldap

使用SQL Server 2005,如何使用NET对非AD LDAP服务器验证用户名/密码对?

1 个答案:

答案 0 :(得分:0)

如果从SQL Server 2005调用,则需要创建.NET存储过程。

使用.NET连接到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
}