Catch RPC lock before error 0x800706BA

2

we have some tools and services which communicate with the same COM server. After some time we get the error

COMException (0x800706BA) RPC server unavailable

It seems that one application blocks the RPC while second tries to communicate and fail. It's not ever the same app and sometimes it takes hours before that occurs. But worst: After the RPC error came for the first time the belonging application gets the same RPC error each time it calls a COM function to this COM server - it's dead. After restarting the application (or service) all runs well, until next time... Is there a way to decide if the RPC is available and then to wait until it's free? If not I have to create a new COM object and hope that I don't have to restart the application.

Thanks for any help.

c#
com
rpc
asked on Stack Overflow Dec 4, 2013 by Harald Pitro

2 Answers

1

(0x800706BA) RPC server unavailable means the client cannot contact the RPC server on the COM server side. Note that there's a separate code for RPC server is too busy. This can happen because either of the following happened:

  • the COM server is on another machine and there's a connectivity problem
  • the COM server has terminated either by exiting the process or by crashing nastily

Note that the latter pretty much matches your description - you instantiated a COM object, obtained a pointer to it and it works for some time and then something happens and any attempts to access the object via that pointer yield RPC server unavailable because well, there's likely no COM server process running anymore and to the RPC server inside it has also disappeared. The only thing you could meaningfully do in this case is reinstantiate the COM object. You will need additional logic in your application that accounts for such cases.

answered on Stack Overflow Dec 5, 2013 by sharptooth
0

I have come across this error with a COM+ object and got it resolved. If a COM+ object is created and used in an application and over the time if the COM+ application gets recycled, reusing of the same COM+ object gives this error. You may have to re-instantiate the COM+ object to get it work again. You can try the following steps to reproduce the error:

  1. Set the lifetime recycle limit of the COM+ application to 1 minute.
  2. Write an application to Create the COM+ object and make a COM+ method call. Let the application sleep for more than a minute and now try to make a method call.
  3. Now, you will receive an error (0x800706BA) RPC server unavailable
answered on Stack Overflow Apr 15, 2016 by Guru HG

User contributions licensed under CC BY-SA 3.0