ldap服务器不可用 [英] ldap server is unavailable

查看:558
本文介绍了ldap服务器不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对此完全陌生

我尝试使用以下代码连接到ldap服务器.

I've tried to connect to an ldap server using the following code.

PrincipalContext principalContext = new PrincipalContext(ContextType.Domain, "abcdef", "OU=abcdef,DC=avengers,DC=net");

我收到"LDAP服务器不可用"异常.

I'm getting an "LDAP server is unavailable" exception.

我查找了其他建议添加用户名和密码的帖子,但我想使用此特定的重载方法,该方法仅包含Context.Domain,Domain和Container参数.

I've looked up other posts which recommended adding username and password to it but I wanted to use this specific overloaded method which takes in Context.Domain, Domain and Container parameters only.

任何建议将不胜感激.

推荐答案

感谢您的答复.

我为域名"参数(第二个参数)传递了错误的值.我发送的是OU值而不是域名.

I was passing in wrong value for the "Domain Name" parameter (second parameter). I was sending OU value instead of Domain Name.

这篇关于ldap服务器不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆