image

编辑人: 青衫烟雨

calendar2025-07-27

message3

visits826

如何进行LDAP用户校验?

private bool Authenticate(string userName, string password, string domain)

{

bool authentic = false;

try

{

DirectoryEntry entry = new DirectoryEntry("LDAP://"+domain, userName, password);

object nativeObject = entry.NativeObject;

authentic = true;

}

catch (DirectoryServicesCOMException) { }

return authentic;

}



喵呜刷题:让学习像火箭一样快速,快来微信扫码,体验免费刷题服务,开启你的学习加速器!

创作类型:
原创

本文链接:如何进行LDAP用户校验?

版权声明:本站点所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明文章出处。
分享文章
share