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

StackOverflow https://stackoverflow.com/questions/16173631

  •  11-04-2022
  •  | 
  •  

Question

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?

Était-ce utile?

La solution

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

public override object InitializeLifetimeService(){
  return null;
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top