[英]How should I access Active Directory from a C# application running on mono in Linux?
我的代码将在Windows(非单声道)和Linux(单声道)中运行。 目前,我正在使用System.DirectoryServices,它在Windows中运行良好。 但在Linux中:
System.NullReferenceException: Object reference not set to an instance of an object
at System.DirectoryServices.DirectorySearcher.InitBlock () [0x00000]
at System.DirectoryServices.DirectorySearcher.DoSearch () [0x00000]
at System.DirectoryServices.DirectorySearcher.get_SrchColl () [0x00000]
at System.DirectoryServices.DirectorySearcher.FindOne () [0x00000]
at (wrapper remoting-invoke-with-check) System.DirectoryServices.DirectorySearcher:FindOne ()
免责声明:我自己没有这样做,但......
Microsoft的System.DirectoryServices命名空间的实现基本上是他们专有DLL的包装。 Mono项目已投入大量精力使其DirectoryServices代码不仅仅用于Microsoft AD,但它可能还没有“全部存在”。
我已经看到至少有一些人更喜欢使用Novell的开源库进行LDAP访问; 这里提供了完整详细的教程 。
RemObjects在其Internet Pack for .NET中也有一个LDAP实现,
除此之外,您可能想尝试破解 Novell 示例解决方案; 我认为它属于“ 尚未实施的类别 ”。
alt text http://img441.imageshack.us/img441/2368/test12i.jpg
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.