SQL Server的LDAP身份验证身份验证、SQL、Server、LDAP

2023-09-07 00:59:32 作者:对酒当歌

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

Using SQL Server 2005, how can I authenticate a username/password pair against a non-AD LDAP server using NET ?

推荐答案

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

If calling from SQL Server 2005, you'll need to create a .NET stored procedure.

使用.NET连接到LDAP:

Using .NET to connect to LDAP:

http://msdn.microsoft.com/en-us/库/ system.directoryservices.aspx

using System.DirectoryServices;

DirectoryEntry DE = new DirectoryEntry(LDAPPath, LDAP_Domain + account, password, AuthenticationTypes.Secure);

if (DE == null)
{
   // Login failure
}
 
精彩推荐
图片推荐