This question is in reference to the article at
broker CAO using factory pattern.
I'm not able to get the destructor called for the CAO, unless the remoting server is stopped.
Is it because the object implemented using factory and the reference to the object becomes anonymous??
I have also tried for override the method "InitializeLifetimeService"
public override object InitializeLifetimeService()
ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
lease.InitialLeaseTime = TimeSpan.FromSeconds(1);
lease.RenewOnCallTime = TimeSpan.FromSeconds(1);
lease.SponsorshipTimeout = TimeSpan.FromSeconds(0);
LifetimeServices.LeaseManagerPollTime = TimeSpan.FromSeconds(1);
LifetimeServices.LeaseTime = TimeSpan.FromSeconds(2);
LifetimeServices.SponsorshipTimeout = TimeSpan.FromSeconds(2);
View Complete Post