title: how to authenticate ldap when not joined to a domain in Microsoft Active Directory using c#
body: <p>For some reason, ldap and directory services does not work when the computer is not joined to the domain.  The error messages from .net is domain not available.  Anyone know what needs to be done?</p>
  
  <p>the basic...</p>
  
  <pre><code> domainAndUsername = domain + @"\" + username;
   entry = new DirectoryEntry(_path, domainAndUsername, pwd);
   entry.AuthenticationType = FindAuthTypeMicrosoft(authType);
  </code></pre>
  
  <p>... doesn't seem to work when logged in locally to the machine when trying to supply testdomain.com to the code above.</p>
  
  <p>Even though I can ping testdomain.com without an issue.  What is different or the problem?</p>