title: When invoking SetPassword i receive the error: “Exception has been thrown by the target of an invocation.”
body: <p>the set password is failed in the server.</p>
  
  <p><code>Exception.message:
  Exception has been thrown by the target of an invocation
  at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args)</code></p>
  
  <p>Why then will this call work from a local (developer) machine, but not
  work from a server? </p>
  
  <pre><code>     `      DirectoryEntry entry = new DirectoryEntry(..);
              entry.AuthenticationType = AuthenticationTypes.Secure;
              DirectorySearcher search = new DirectorySearcher(entry);
              search.Filter = "(&amp;(sAMAccountName=" + userName_ + "))";
              DirectoryEntry userEntry = search.FindAll()[0].GetDirectoryEntry();
              userEntry.Invoke("SetPassword", new object[] {password@12345#"
              userEntry.CommitChanges();`
  </code></pre>
  
  <p>EDIT : InnerException is {"The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"}</p>