locked
Object dieing after some idle time RRS feed

  • Question

  • Hi,

    Need some help ragarding remoting .

    I have an application developed using remoting scneorio.

    I am using SAO singleton objects. My application is working fine.

    But when i left the application idle on client sie, (user machine  and not server machine)

    say some half an hour, ,y application returns the error. I found that object is dieing after some idle period.

    Any guess why this is happening

    Thanks

    Vyanki

     

    Friday, August 18, 2006 3:03 PM

Answers

  • This article should do it for you
    Friday, August 18, 2006 8:29 PM
  • Hi Vyanki, did you check out the document Gandalf referenced?  It sounds like your singleton is timing out, which is a normal part of .NET Remoting.  If you want to control the singleton's lifetime you'll need to register a sponsor.  When a lease is set to expire, we ask all the sponsor's if it's OK to collect the object.  The sponsors either say "OK, go ahead and kill it", or say "No, let it live another 10 minutes, then ask me again".

    For more information on how this works, check out Juval Lowy's excellent article on MSDN:

    http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/default.aspx

    Cheers,

    JJustice [MSFT]

    Monday, August 21, 2006 7:21 PM
    Moderator

All replies

  • This article should do it for you
    Friday, August 18, 2006 8:29 PM
  • Hi,

    Thanks for reply.

    Actually my application is working fine. Only thing is, when I left the application idle for an hour, it gives the error.

    So i anot able to figure out, are there any factors/IIS settings which are causing my objects to die after some idle time.

    Rgds

    Vyanki

    Monday, August 21, 2006 5:50 AM
  • What lifetime did you set on the objects?
    Monday, August 21, 2006 3:47 PM
  • Hi Vyanki, did you check out the document Gandalf referenced?  It sounds like your singleton is timing out, which is a normal part of .NET Remoting.  If you want to control the singleton's lifetime you'll need to register a sponsor.  When a lease is set to expire, we ask all the sponsor's if it's OK to collect the object.  The sponsors either say "OK, go ahead and kill it", or say "No, let it live another 10 minutes, then ask me again".

    For more information on how this works, check out Juval Lowy's excellent article on MSDN:

    http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/default.aspx

    Cheers,

    JJustice [MSFT]

    Monday, August 21, 2006 7:21 PM
    Moderator
  • Hi,

    we have not set any times for object lifetime

    we are using

    public override   object    InitializeLifetimeService()
    {
               return null;
    }

    which will set the lifetime to infinite.

     

    Thanks & Rgds

    Vyankatesh

    Friday, August 25, 2006 7:28 AM