none
RPC server is unavailable 0x800706BA, while updating password for user in active directory RRS feed

  • Question

  • 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 = "agreeen@gmail.com";
    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 try to run the code from the m/c running AD, I am able to successfully create an account with password.

    Please let me know what i am doing wrong.

    Thanks


    Wednesday, August 28, 2013 9:08 PM

Answers

  • Hi sanjay_nadimpalli,

    Welcome to MSDN forums.

    According to your description, you got an exception message when you are trying to create a new user, and set its password. I have to say that you are very familiar with RPC server and very professional.

    To narrow down this issue, I suggest follow the instruction mentioned in sectionTo resolve the "RPC server is unavailable"error”in http://technet.microsoft.com/en-us/library/cc961921.aspx

    And use ADSI Edit http://technet.microsoft.com/en-us/library/cc773354(v=ws.10).aspx to perform the same action and see if it works.

    To save you some time, I will share some information here.
     
    The "RPC server unavailable" error can occur for any of the following reasons:
     
    1. The RPC service is not active.
     
    2. You are unable to resolve a DNS or NetBIOS name.
     
    3. An RPC channel cannot be established.
     
    To resolve the "RPC server is unavailable" error
    1.On the server, from the Start menu click Run.

    2.Type the following line in the Open box:
     net start rpcss

    3.Click OK.

    4.Perform a test to determine whether you still receive an error. For example, test a connection to a domain controller. If you receive an error, continue to the next step.

    5.On the Start menu, point to Programs and Accessories, and then click Command Prompt. At the command prompt, type the following:
    ping <servername>where <servername> is the server, and NetBIOS, DNS, or GUID is the name that you want to test for connectivity. If there is a connection issue with one of these computers, contact your network administrator to resolve the issue. If the error still occurs, continue to the next step.

    6 .Use the Netdiag tool to determine whether the domain controller is working correctly. (You can perform a network trace by using the MSRPC, DNS, NBT, LDAP, or TCP protocols.) If there is an issue with the domain controller, contact your network administrator to resolve the error. If the error still occurs, continue to the next step.

    7 .Use the Netdom tool to verify network trust relationships and to reset or establish a connection to a server. If the domain cntroller for the domain cannot be found, the domain name is not being resolved properly. Contact your network administrator to resolve the issue. If the domain controller is found, the RPC communication channel is functioning. You can use the Netdom tool to reset or establish a connection to another server.

    From a support perspective this is really beyond what we can do here in the forums. You should to consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs:

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Thanks for your understanding.

    Regards,

    Damon


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Tuesday, September 3, 2013 9:35 AM

All replies

  • Hi,

    The Windows Firewall (formerly known as Internet Connection Firewall) service and Distributed Component Object Model (DCOM) can cause access denied errors (such as an "RPC Server Unavailable" error - 0x800706ba) when your remote computers and accounts, used for remote connections, are not properly configured.

    You can create a remote connection between most operating system versions. However, in the basic remote     connection scenario where Computer A connects to a WMI namespace on Computer B, the target Computer B may require     higher levels of security.

    You can refer to the references below.

    http://msdn.microsoft.com/en-us/library/aa389286.aspx

    http://msdn.microsoft.com/en-us/library/aa389284(v=vs.85).aspx

    http://msdn.microsoft.com/en-us/library/aa389286.aspx

    Regards


    ALL FOR ONE AND ONE FOR ALL.

    Saturday, August 31, 2013 1:16 AM
  • Hey, Thanks for the reply, I tried all the things mentioned in the documentation, adding all the ports for RPC under firewall exception rule. logging in as administrator so that there are no privilege issues. Nothing worked, still getting the same error
    Sunday, September 1, 2013 3:51 AM
  • Hi sanjay_nadimpalli,

    Welcome to MSDN forums.

    According to your description, you got an exception message when you are trying to create a new user, and set its password. I have to say that you are very familiar with RPC server and very professional.

    To narrow down this issue, I suggest follow the instruction mentioned in sectionTo resolve the "RPC server is unavailable"error”in http://technet.microsoft.com/en-us/library/cc961921.aspx

    And use ADSI Edit http://technet.microsoft.com/en-us/library/cc773354(v=ws.10).aspx to perform the same action and see if it works.

    To save you some time, I will share some information here.
     
    The "RPC server unavailable" error can occur for any of the following reasons:
     
    1. The RPC service is not active.
     
    2. You are unable to resolve a DNS or NetBIOS name.
     
    3. An RPC channel cannot be established.
     
    To resolve the "RPC server is unavailable" error
    1.On the server, from the Start menu click Run.

    2.Type the following line in the Open box:
     net start rpcss

    3.Click OK.

    4.Perform a test to determine whether you still receive an error. For example, test a connection to a domain controller. If you receive an error, continue to the next step.

    5.On the Start menu, point to Programs and Accessories, and then click Command Prompt. At the command prompt, type the following:
    ping <servername>where <servername> is the server, and NetBIOS, DNS, or GUID is the name that you want to test for connectivity. If there is a connection issue with one of these computers, contact your network administrator to resolve the issue. If the error still occurs, continue to the next step.

    6 .Use the Netdiag tool to determine whether the domain controller is working correctly. (You can perform a network trace by using the MSRPC, DNS, NBT, LDAP, or TCP protocols.) If there is an issue with the domain controller, contact your network administrator to resolve the error. If the error still occurs, continue to the next step.

    7 .Use the Netdom tool to verify network trust relationships and to reset or establish a connection to a server. If the domain cntroller for the domain cannot be found, the domain name is not being resolved properly. Contact your network administrator to resolve the issue. If the domain controller is found, the RPC communication channel is functioning. You can use the Netdom tool to reset or establish a connection to another server.

    From a support perspective this is really beyond what we can do here in the forums. You should to consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs:

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Thanks for your understanding.

    Regards,

    Damon


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Tuesday, September 3, 2013 9:35 AM