RemotingServices.Marshal(foo,uri)仅在短时间内工作.如何使其正常工作? [英] RemotingServices.Marshal(foo, uri) only works for a short period of time. How to keep it working?
本文介绍了RemotingServices.Marshal(foo,uri)仅在短时间内工作.如何使其正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我这样做
RemotingServices.Marshal(foo, uri);
并且客户端连接,一切正常.当我等待几分钟,然后尝试连接客户端时,客户端抛出RemotingException:对象'{name of service}'已断开连接或在服务器上不存在.
And the Client connects, everything works. When I wait for a few minutes and then try to connect the client, the Client throws a RemotingException: Object '{name of service}' has been disconnected or does not exist at the server.
这里发生了什么?有某种超时方法吗?
What happens here? Is there a timeout of some sort?
推荐答案
为避免超时,可以将以下覆盖的方法添加到远程对象中:
To avoid timeouts, you can add to your remoted object the following overridden method:
public override object InitializeLifetimeService(){
return null;
}
这篇关于RemotingServices.Marshal(foo,uri)仅在短时间内工作.如何使其正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文