RemotingServices.Marshal(foo, uri) only works for a short period of time. How to keep it working?

。_饼干妹妹 提交于 2019-12-25 05:45:19

问题


When I do

RemotingServices.Marshal(foo, uri);

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?


回答1:


To avoid timeouts, you can add to your remoted object the following overridden method:

public override object InitializeLifetimeService(){
  return null;
}


来源:https://stackoverflow.com/questions/16173631/remotingservices-marshalfoo-uri-only-works-for-a-short-period-of-time-how-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!