.NET LDAP路径工具(C#) [英] .NET LDAP paths utilities (C#)

查看:286
本文介绍了.NET LDAP路径工具(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有LDAP路径操纵一个.net库?
我想有一些东西等同于 System.IO.Path ,允许如做这样的事情

Is there a .NET library for LDAP paths manipulations?
I would like to have something equivalent to System.IO.Path, allowing e.g. to do something like

string ou1 = LDAPPath.Combine("OU=users","DC=x,DC=y");
string ou2 = LDAPPath.Parent("CN=someone,OU=users,DC=x,DC=y");

否则,有什么应对在.NET LDAP专有名称?

Otherwise, what's the common way to deal with LDAP distinguished names in .NET?

为了澄清我的问题:我不是问一般,在.NET目录服务;我已经过这一点,并做了一些程序来执行某些任务。我觉得缺少的是一个适当的方式为操作路径,解析专有名称等,并且由于这应该是pretty的共同需要,我希望有一个更清洁的方式,而不是做分裂逗号串(1)。

To clarify my question: I'm not asking about "directory services in .NET" in general; I've already worked with that and done some programs to perform some tasks. What I feel is missing is a proper way to manipulate paths, parse distinguished names and so on, and since this should be a pretty common need, I hope there's a cleaner way to do this than split a string on commas(1).

(1)等,例如,要求在分割上逗号的字符串库中的函数

(1) like, for example, calling a function in a library that splits the string on commas

推荐答案

没有,不是我的知识 - 甚至在最新的.NET 3.5的命名空间为Active Directory。

No, not to my knowledge - not even in the most recent .NET 3.5 namespace for Active Directory.

您可以浏览层次结构(将父等)的目录本身 - 但你需要绑定到如由的DirectoryEntry 的手段Active Directory中。

You can navigate the hierarchy (going to the parent etc.) in the directory itself - but you need to be bound to e.g. Active Directory by means of a DirectoryEntry.

再有就是在 NameTranslate API ,但是这确实多了一个更改此名称为另一个名称,例如:从用户主要名称更改为相对DN - 又一次,它要求在公元一的DirectoryEntry 连接

And then there's the NameTranslate API, but that's really more of a "change this name to another name", e.g. change from user-principal name to relative DN - and again, it requires a connection to a DirectoryEntry in AD.

我最感兴趣的是找到这样的库,但到目前为止,我还没有听说过约一 - 无论是在.NET中,也没有任何其他语言,真的。

I would be most interested in finding such a library, but so far, I haven't heard about one - neither in .NET nor in any other language, really.

早在我的重型AD编程天,我有我自己的一套LDAP路径处理程序(在Delphi) - 基本上只是字符串分析和处理

Back in my "heavy-duty" AD programming days, I had my own set of LDAP path manipulation routines (in Delphi) - basically just string parsing and handling.

马克·

这篇关于.NET LDAP路径工具(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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