简体   繁体   English

在错误0x800706BA之前捕获RPC锁定

[英]Catch RPC lock before error 0x800706BA

we have some tools and services which communicate with the same COM server. 我们有一些工具和服务可以与同一个COM服务器通信。 After some time we get the error 一段时间后,我们得到了错误

COMException (0x800706BA) RPC server unavailable COMException(0x800706BA)RPC服务器不可用

It seems that one application blocks the RPC while second tries to communicate and fail. 似乎一个应用程序阻止了RPC,而第二个应用程序尝试进​​行通信并失败。 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. 但更糟糕的是:在RPC错误首次出现之后,所属应用程序每次向该COM服务器调用COM函数时,都会收到相同的RPC错误-它已死。 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? 重新启动应用程序(或服务)后,所有程序运行良好,直到下一次...是否有办法确定RPC是否可用,然后等待其释放? If not I have to create a new COM object and hope that I don't have to restart the application. 如果不是,我必须创建一个新的COM对象,并希望我不必重新启动应用程序。

Thanks for any help. 谢谢你的帮助。

(0x800706BA) RPC server unavailable means the client cannot contact the RPC server on the COM server side. (0x800706BA)RPC服务器不可用意味着客户端无法联系COM服务器端的RPC服务器。 Note that there's a separate code for RPC server is too busy . 请注意,有一个单独的代码用于RPC服务器太忙 This can happen because either of the following happened: 发生这种情况的原因是以下任何一种情况:

  • the COM server is on another machine and there's a connectivity problem COM服务器在另一台计算机上,并且存在连接问题
  • the COM server has terminated either by exiting the process or by crashing nastily COM服务器已通过退出进程或崩溃而终止

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. 请注意,后者几乎符合您的描述-实例化了一个COM对象,获得了指向它的指针,并且它工作了一段时间,然后发生了某些事情,并且通过该指针访问该对象的任何尝试都会导致RPC服务器不可用,因为没有再运行的COM服务器进程以及其中的RPC服务器也消失了。 The only thing you could meaningfully do in this case is reinstantiate the COM object. 在这种情况下,您唯一可以做的就是重新实例化COM对象。 You will need additional logic in your application that accounts for such cases. 您的应用程序中将需要其他逻辑来解决此类情况。

I have come across this error with a COM+ object and got it resolved. 我遇到了一个COM +对象的错误,并将其解决。 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. 如果在应用程序中创建并使用了COM +对象,并且随着时间的流逝,如果COM +应用程序被回收,则重复使用同一COM +对象会出现此错误。 You may have to re-instantiate the COM+ object to get it work again. 您可能必须重新实例化COM +对象才能使其再次工作。 You can try the following steps to reproduce the error: 您可以尝试以下步骤来重现该错误:

  1. Set the lifetime recycle limit of the COM+ application to 1 minute. 将COM +应用程序的生命周期回收限制设置为1分钟。
  2. Write an application to Create the COM+ object and make a COM+ method call. 编写一个应用程序以创建COM +对象并进行COM +方法调用。 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 现在,您将收到错误(0x800706BA)RPC服务器不可用

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复“CCertRequest::Submit:RPC 服务器不可用。0x800706ba”错误? - How to fix "CCertRequest::Submit: The RPC server is unavailable. 0x800706ba" error? System.Runtime.InteropServices.COMException(0x800706BA):RPC服务器不可用。 (HRESULT异常:0x800706BA) - System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) WMI RPC服务器不可用。 (来自HRESULT的异常:0x800706BA) - WMI The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) RPC服务器不可用。 (来自HRESULT的异常:0x800706BA)-Excel - The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) - Excel 如何处理 System.Runtime.InteropServices.COMException (0x800706BA):RPC 服务器不可用。 (来自 HRESULT 的异常:0x800706BA) - How to handle System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) RPC服务器不可用。 连接到远程计算机时(来自HRESULT的异常:0x800706BA) - The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) when connecting to remote computer LDAP 从域外重置密码。网络 C# 错误:RPC 服务器不可用。 (hresult 的异常:0x800706ba) - LDAP reset password from outside the domain network C# Error: RPC server is unavailable. (exception from hresult: 0x800706ba) WMI:RPC服务器不可用。 (尝试连接到远程计算机时抛出HRESULT异常:0x800706BA) - WMI: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) throws when try to connect to remote machine 如何尝试捕获到脱机RPC服务器的RPC调用? - How to try-catch a RPC call to an offline RPC server? 错误:StreamJsonRpc.ConnectionLostException:与远程方的 JSON-RPC 连接在请求完成之前丢失 - Error :StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM