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 using
Activator.GetObject() functionwhen 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.