首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Novell eDirectory与.NET DirectoryServices

Novell eDirectory与.NET DirectoryServices
EN

Stack Overflow用户
提问于 2012-07-26 15:03:07
回答 1查看 3.3K关注 0票数 2

在我们公司,我们有一个项目,应该使用Novell eDirectory和.net应用程序。我尝试过Novell (http://www.novell.com/coolsolutions/feature/11204.html)在.NET应用程序之间进行连接。它很好用。

但是,根据需求,我们特别需要.net Api来连接不工作的Novell。与.NET Api DirectoryServices的连接和绑定无法工作。

我们的Novell eDirectory安装有以下凭据:

  1. IP地址: 10.0.x.xx(witsxxx.companyname.com)
  2. 树: SXXXX
  3. 新树上下文:WIxxxK01 01-NDS.OU=STATE.O=ORG
  4. 管理上下文是: ou=STATE,o=ORG
  5. 管理:管理
  6. 密码:管理员

我使用了Novell Api并使用了以下代码

代码语言:javascript
复制
String ldapHost ="10.0.x.xx";
String loginDN = "cn=admin,cn=WIxxxK01-NDS,OU=STATE,o=ORG";
String password = string.Empty;
String searchBase = "o=ORG";
String searchFilter = "(objectclass=*)";
Novell.Directory.Ldap.LdapConnection lc = new Novell.Directory.Ldap.LdapConnection();

try
{
    // connect to the server
    lc.Connect(ldapHost, LdapPort);
    // bind to the server
    lc.Bind(LdapVersion, loginDN, password);
}

这是正确的绑定和搜索可以完成。

现在我的问题是,当我尝试使用.NET APi和使用System.DirectoryServicesSystem.DirectoryServices.Protocols时,它不是连接或绑定。

我甚至不能测试下面的DirectoryEntry.Exists方法。会有例外的。

代码语言:javascript
复制
string myADSPath = "LDAP://10.0.x.xx:636/OU=STATE,O=ORG";

// Determine whether the given path is correct for the DirectoryEntry.
if (DirectoryEntry.Exists(myADSPath))
{
    Console.WriteLine("The path {0} is valid",myADSPath);
}
else
{
    Console.WriteLine("The path {0} is invalid",myADSPath);
}

它的意思是Server is not operationalLocal error occurred等,我不知道目录路径发生了什么。

我试过了

代码语言:javascript
复制
DirectoryEntry de = new DirectoryEntry("LDAP://10.0.x.xx:636/O=ORG,DC=witsxxx,DC=companyname,DC=com", "cn=admin,cn=WIxxxK01-NDS,o=ORG", "admin");
DirectorySearcher ds = new DirectorySearcher(de, "&(objectClass=user)");
var test = ds.FindAll();

都会有例外。

你能帮我解决这个问题吗?userDN for DirectoryEntry应该如何?

我也使用System.DirectoryServices.Protocols.LdapConnectionLdapDirectoryIdentifierSystem.Net.NetworkCredential,但没有结果。只有同样的例外。

感谢你宝贵的时间和帮助。

谢谢你,比努

EN

回答 1

Stack Overflow用户

发布于 2012-08-09 14:33:39

要诊断LDAP连接错误,可以从管理员访问eDirectory服务器,并使用iMonitor (serverIP:8028/nds并选择iMonitor),在Dstrace中清除所有选项卡并启用LDAP跟踪,然后绑定查看LDAP端发生的情况,以查看是否存在更多描述性错误。或者你甚至有足够的距离来绑定和建立连接。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11672277

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档