[Mono-list] remoting lease timeout issues

brendan powers brendan0powers at gmail.com
Fri Jul 22 12:04:45 EDT 2005

I am having touble with lease timeout with remoting objects.
The exception i get is 

Unhandled Exception: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.Runtime.Remoting.RemotingException: Requested service not
found. No receiver for uri

However, when i atach a sponsor object, the sponsor object is not alwasy called
Here is my sponsor object

public class GenericSponsor : MarshalByRefObject,ISponsor
	public TimeSpan Renewal(ILease lease)
		Console.WriteLine("Sponsor: lease is {0}",lease.CurrentState);
		Console.WriteLine("Renewing Lease");

and here is the code i use to atach it to an object
ISponsor sponsor = new GenericSponsor();
ILease lease = (ILease)RemotingServices.GetLifetimeService(hwmp);

I have several object this sponsor is atached to, sometimes i get the
"Renewing Lease" message for all the objects, and sometimes i don't. I
always get at least 1

Also, some object that i use have actually been registered as
services, some have not. For example object a has been registered to
url tcp://somhost/object, however object a is just used to access
object b, with is not directly register. So object b is accesed via
object a (object b = a.getobjectb). Don't know if this matters.

Any ideas?

More information about the Mono-list mailing list