Note that there are some explanatory texts on larger screens.

plurals
  1. POcan't connect to AD without specifically connecting to a DC
    primarykey
    data
    text
    <p>I'm trying to bind to an Active Directory server in C# but on-site I seem to have issues not reproducible in the test environment.</p> <p>I'm getting an Exception</p> <pre><code>System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.RefreshCache() at System.DirectoryServices.DirectoryEntry.FillCache(String propertyName) at System.DirectoryServices.DirectoryEntry.get_NativeGuid() </code></pre> <p>the code looks like this</p> <pre><code>// domainStr = "LDAP://domainname/rootDSE using (var de = new DirectoryEntry(domainStr, Username, Password)) { var guid = de.NativeGuid; } </code></pre> <p>however if I try to connect the the Domain Controller instead (<code>domainStr = "LDAP://domainController/rootDSE"</code> or fully qualified <code>domainStr = "LDAP://domainController.DomainName"</code>) it works just fine.</p> <p>I tried</p> <pre><code>var d = Domain.GetDomain(new DirectoryContext( DirectoryContextType.Domain, domainStr, Username, Password)); </code></pre> <p>but I get the exact same Exception when doing that.</p> <p>I'm wondering if I'm doing something wrong, maybe a different LDAP URL would work better or if that's a common problem I'm having (even though google searches bring up that problem I haven't found a solution that works for me)</p> <p>Also it might be worth pointing out that the server the software is running on is not in any Active Directory and I have a list of ADs that I connect to (hence the username and password when trying to connect)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload