1
Vote

COM Exception Unhandled: DirectorySource.cs

description

Just downloaded the project, but I can't run it. Getting this error in the DirectorySource.GetResults() method. Shouldn't the COM server be registered when the project is compiled?
 
 
System.Runtime.InteropServices.COMException was unhandled
Message="The server is not operational.\r\n"
Source="System.DirectoryServices"
ErrorCode=-2147016646
StackTrace:
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
   at System.DirectoryServices.DirectorySearcher.FindAll()
   at BdsSoft.DirectoryServices.Linq.DirectoryQuery`1.<GetResults>d__0.MoveNext() in C:\CGI\LINQtoAD CodePlex Release\BdsSoft.DirectoryServices.Linq\DirectorySource.cs:line 361
   at Demo.Program.Main(String[] args) in C:\CGI\LINQtoAD CodePlex Release\Demo\Program.cs:line 47
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
InnerException:

comments

holyhandgrenade wrote Jun 14, 2009 at 6:36 AM

If you haven't found your issue; the following message:

Message="The server is not operational.\r\n"

Means that the active directory domain specified did not respond to the query. You do have to be connected to an Active Directory domain, and any time you see the LDAP:// it has to be followed by a domain controller.

wrote Feb 14, 2013 at 6:56 PM