.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > Delegates are lost after 5 mins
 

Delegates are lost after 5 mins

Hi,

Iam having a problem similier to this one posted before :

http://forums.msdn.microsoft.com/en-US/netfxremoting/thread/2047ea91-7ad1-4eaf-84e7-513dd454a22a/




the problem is, the delegates are lost after 5 mins, as their life time expires, and i dont have an idea how did this guy solve the problem, i tried to do the same thing he did, but i couldnt because he wrote something i couldnt understand,


someone please help me, this is a short explaination of my solution :


I have 3 classes in my program,


//// the server

public partial class ServerForm : Form

{
}


//// the remoting class

public class RemotingClass :MarshalByRefObject

{

[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]

public override object InitializeLifetimeService()

{

return null;

}

}

//// and a client

[Serializable()]

public partial classClient : Form

{

}


The server registers the channel and the remoting service (singleton), the remoting class is an object living in the server, and the client connects to the server usingActivator.GetObject() function


when a client sends a delegate to the remotingclass, this delegate will be valid only for 5 mins, how can i make it live forever?how cani override the delegate's lifetime?

thanks in advance.

TamirMalas
Here's some documentation that describes lifetimes in remoting:

http://msdn.microsoft.com/en-us/library/6tkeax11.aspx

Basically, you'll need to renew the lease on the delegate object when it expires.

Hope this helps.
Nathan Anderson - MSFT
Here's some documentation that describes lifetimes in remoting:

http://msdn.microsoft.com/en-us/library/6tkeax11.aspx

Basically, you'll need to renew the lease on the delegate object when it expires.

Hope this helps.
Nathan Anderson - MSFT

You can use google to search for other answers

Custom Search

More Threads

• Bad SSPI performance on Vista
• Event Handling in .NET Remoting (TCP Channel - Binary Formatter)
• Multiple server objects in one remoting configuration file
• strategy for starting a new process and invoke a remote method in the new process?
• Server and client configuration with remoting
• How can I call a server COM DLL from a client machine?
• TcpChannel Remoting throws System.Net.Sockets.SocketException
• Remoting - disconnection over WAN
• Copy/paste of generic collections
• How do I set up remoting with VS 2005?