Object dieing after some idle time

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




Answer this question

Object dieing after some idle time

  • Moustafa Arafa

    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



  • Gunston

    What lifetime did you set on the objects

  • MaryJaneF

    This article should do it for you

  • RostaB

    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



  • utkuozan

    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]


  • Object dieing after some idle time