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 ()
source share