lorenb 0 Newbie Poster

All,
I'm facing a strange issue regarding remoting in C# (entire solution attached). I have a written a very small serial terminal which has a tcp server method:

TcpChannel ch = new TcpChannel(8085);
ChannelServices.RegisterChannel(ch);   
RemotingConfiguration.RegisterWellKnownServiceType(typeof(Class1), "test", WellKnownObjectMode.Singleton);

sever is running, no problem. Client code:

QAserialTerminal.Class1 c = new Class1();
c = (QAserialTerminal.Class1)Activator.GetObject(typeof(QAserialTerminal.Class1), "tcp://localhost:8085/test");

Client is connecting to server but it doesn't read the correct value of a member inside the server class (bool isPortOpen)
In other words, when the serial port is opened, the value of "isPortOpen" goes to "true", but the client "sees" it as false.
Any idea? Solution is attached.

Thanks a lot!