Hi,
Iworte a test program that contains a remote object.I used the config file for theReoting definitions - all works properly so far ...
howerver, I've noticed that theremotable object is instanced onlyat the fiest connection of a client.
I'd like to instance the object when the server goes up -what changes should I make?
this is the config file I used:
<?
xml version="1.0" encoding="utf-8" ?>
<
configuration>
<
system.runtime.remoting>
<
application>
<
lifetime leaseTime="20D" sponsorshipTimeout="1H" renewOnCallTime="1D" leaseManagerPollTime="1H" />
<
client>
<
wellknown type="Server1.Remotable,Server1" url="tcp://localhost:8081/Remotable" />
</
client>
<
channels>
<
channel ref="tcp" port="0" clientConnectionLimit="20" >
</
channel>
</
channels>
</
application>
</
system.runtime.remoting>
</
configuration>
and this is the service code:
AutoResetEvent stop = new AutoResetEvent(false);
try
{
RemotingConfiguration.Configure("MyConfigFile.config");
stop.WaitOne();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
many thanks ....
ofer