the set password is failed in the server.
Exception.message:
Exception has been thrown by the target of an invocation
at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args)
Why then will this call work from a local (developer) machine, but not work from a server?
` DirectoryEntry entry = new DirectoryEntry(..);
entry.AuthenticationType = AuthenticationTypes.Secure;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(&(sAMAccountName=" + userName_ + "))";
DirectoryEntry userEntry = search.FindAll()[0].GetDirectoryEntry();
userEntry.Invoke("SetPassword", new object[] {password@12345#"
userEntry.CommitChanges();`
EDIT : InnerException is {"The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"}
Does the app run under the same account in both environments? If not, then per your question, it may be a permissions issue
User contributions licensed under CC BY-SA 3.0