How do I access Active Directory from a C # application running on mono on Linux?

My code will work on Windows (not mono) and on Linux (mono). I am currently using System.DirectoryServices, which works fine on Windows. But on 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 () 
+4
source share
3 answers

RemObjects also has an LDAP implementation in its Internet Pack for .NET,

http://blogs.remobjects.com/blogs/ck/2010/02/08/p1043

+1
source

Disclaimer: I did not do it myself, but ...

The Microsoft implementation of the System.DirectoryServices namespace is basically a wrapper around its own DLLs. The Mono project has put a lot of effort into making their DirectoryServices code more than with Microsoft AD, but it might not be โ€œall thereโ€ yet.

I saw that at least a few people chose to use Instead of Novell Open Source for LDAP ; A complete and detailed guide is available here .

+2
source
0
source

Source: https://habr.com/ru/post/1308244/


All Articles