Announcement

Collapse
No announcement yet.

RPC server is unavailable 0x800706BA, while updating password for user in active dire

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • RPC server is unavailable 0x800706BA, while updating password for user in active dire

    I am using System.DirectoryServices.AccountManagement apis to create a new user/disable an account in Active Directory. When i am trying to create a new user, and set its password, m/c throws an exception with the message The RPC server is unavailable. (Exception from HRESULT: 0x800706BA). The following snippet is used to create and persist the user.
    UserPrincipal user = new UserPrincipal(ctx);
    user.GivenName = "Andrew";
    user.Surname = "Green";
    user.EmailAddress = "[email protected]";
    user.SamAccountName = "agreen";
    user.Save();
    user.SetPassword("Pqw^&12");
    user.Save();
    When i execute this, the code throws an exception as soon as it tries to set a password. After a little search on the net, I tried out the following things.

    Since acct agreen gets created without password, there is no privilege or connection issue.
    I added Windows Management Instrumentation(WMI) as exception to the windows firewall on my AD machine
    I ensured that the following services RPC Endpoint Mapper, Remote Procedure Call, Remote Registry are running on the AD machine.
    Ensured that the account, that is used to connect to AD machine, has Enable remote Controlchecked
    I verified that port 135 is not blocked on AD machine
    The setup that i have is, I have box b1 running Microsoft Windows 7 Professional, which is trying to connect to a box b2, running Microsoft Windows Server 2008 R2 enterprise. The c# code is running on .Net4.5 framework on b1, and trying to create account on b2.

    When i tried running the code from the same box(i.e. box with AD), I was able to successfully create the account with password, when i specified the ip address as localhost, but when i specified it as m/c ip address, it failed with the same exception

    Please let me know what i am doing wrong.

    Thanks

  • #2
    Re: RPC server is unavailable 0x800706BA, while updating password for user in active

    What does "m/c" mean?

    If it works when using localhost and not when using an IP address, check the IP address and make sure it's correct. You could also try using the FQDN instead of an IP address.
    Regards,
    Jeremy

    Network Consultant/Engineer
    Baltimore - Washington area and beyond
    www.gma-cpa.com

    Comment


    • #3
      Re: RPC server is unavailable 0x800706BA, while updating password for user in active

      Just to confirm, The Windows 7 Client is on the Domain isn't it, and the DNS is configured correctly and you can nslookup the AD domain SRV records correctly?

      Also you say you've added a firewall exception, are you sure this is working? Try disabling the firewall completely or running

      Code:
      winrm quickconfig
      to ensure it's setup properly.
      * Shamelessly mentioning "Don't forget to add reputation!"

      Comment

      Working...
      X