Note that there are some explanatory texts on larger screens.

plurals
  1. POActiveDirectoryServerDownException when getting the current Domain on a Wireless network
    primarykey
    data
    text
    <p>I have a problem regarding the Active Directory classes in C#. At one moment in my program, I am trying to get the current Domain the user is logged in using the following command:</p> <pre><code>Domain.GetCurrentDomain(); </code></pre> <p>Most of the times, it works. But when executing from a wireless laptop, it gives me the following error:</p> <pre><code>System.DirectoryServices.ActiveDirectory.ActiveDirectoryServerDownException: The server is not operational. Name: "DOMAIN.ca" ---&gt; System.Runtime.InteropServices.COMException: The server is not operational. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName) --- End of inner exception stack trace --- at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName) at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context) at System.DirectoryServices.ActiveDirectory.Domain.GetCurrentDomain() at ADT.ADTools.ComputerIsInDomain() </code></pre> <p>In my particular case, this piece of code should work on any account logged in an Active Directory account, regardless of the computer it's being ran on or if the computer is connected to the domain using wireless or wired connection.</p> <p>Does anyone of you knows the answer to that problem or any workarounds I could do to make it work?</p>
    singulars
    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.
    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