title: Authenticating local users off the network
body: <p>I am trying to authenticate a local user based on the username and password provided. I came across this thread: <a href="https://stackoverflow.com/questions/290548/c-validate-a-username-and-password-against-active-directory">Validate a username and password against Active Directory?</a></p>
  
  <p>Here is how I validate the user:</p>
  
  <pre><code>PrincipalContext pc = new PrincipalContext(ContextType.Machine);
  bool isValid = pc.ValidateCredentials(user, pass);
  </code></pre>
  
  <p>It works as long as I am on a network, but if I disconnect my computer it gives me:</p>
  
  <blockquote>
    <p>The network path was not found.</p>
  </blockquote>
  
  <p>All I am trying to do is validate on the local machine which may or may not be a part of a network.</p>
  
  <p>EDIT: UserPrincipal.FindByIdentity seems to still work with no AD, it's the pc.ValidateCredentials that is giving me trouble.</p>