RemotingServices.Marshal(foo, uri) only works for

2019-09-11 01:27发布

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条回答
家丑人穷心不美
2楼-- · 2019-09-11 01:56

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

public override object InitializeLifetimeService(){
  return null;
}
查看更多
登录 后发表回答