-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: CoolestArshu
Message 2 in Discussion

Hi Harsha,
 
Are you using Singletons? Generally,remoting uses a so called "lease based" lifetime 
services. When you create an object it has a certain time-to-live (normally 5 minutes) 
upon every methodcall you place from your client onto the object an additional time 
("RenewOnCallTime", usually 2 minutes) will be added to the object's lifetime. 
 
You can achieve the time-out like this:
public class Foo : MarshalByRefObject {
  public override Object InitializeLifetimeService()
  {     
    ILease lease = (ILease)base.InitializeLifetimeService();
    if (lease.CurrentState == LeaseState.Initial)  {
      lease.InitialLeaseTime = TimeSpan.FromMinutes(100);
      lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
      lease.RenewOnCallTime = TimeSpan.FromSeconds(100);
    }
    return lease;
  }
}Just see this is what you are lookubg at..."Software is like sex, it's better when 
it's free." - Linus TorvaldsRegards,Arshad

Do you Yahoo!?

Yahoo! SiteBuilder - Free, easy-to-use web site design software

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to