C
Chester West
I'm starting to think this is not possible....
I've got a Singleton remote object created/registered. I can access the
object, modify data, etc., to my hearts content, just as long as I access it
from a remote machine.....THIS MAKES REMOTING relatively useless for me.
The object is registered as follows:
int port=System.Convert.ToInt32(this.txtPort.Text.Trim());
this.serverchannel=new TcpServerChannel ( port ) ;
ChannelServices.RegisterChannel ( this.serverchannel ) ;
RemotingConfiguration.RegisterWellKnownServiceType ( typeof ( User ) ,
"User", WellKnownObjectMode.Singleton ) ;
The object is declared as follows:
[Serializable]
public class User:MarshalByRefObject
{
string myMessage="This is a message from the server";
public User()
{}
public void SetMessage(string Msg)
{
this.myMessage=Msg;
}
public string GetMessage()
{
return this.myMessage;
}}
I need to be able to access the same remote object from BOTH the client AND
the Server, so that I can set values to be seen by the client machines.
My question:
(1) Can this be done
(2) How can you do this
(3) Examples, if possible, please.
Thank you
I've got a Singleton remote object created/registered. I can access the
object, modify data, etc., to my hearts content, just as long as I access it
from a remote machine.....THIS MAKES REMOTING relatively useless for me.
The object is registered as follows:
int port=System.Convert.ToInt32(this.txtPort.Text.Trim());
this.serverchannel=new TcpServerChannel ( port ) ;
ChannelServices.RegisterChannel ( this.serverchannel ) ;
RemotingConfiguration.RegisterWellKnownServiceType ( typeof ( User ) ,
"User", WellKnownObjectMode.Singleton ) ;
The object is declared as follows:
[Serializable]
public class User:MarshalByRefObject
{
string myMessage="This is a message from the server";
public User()
{}
public void SetMessage(string Msg)
{
this.myMessage=Msg;
}
public string GetMessage()
{
return this.myMessage;
}}
I need to be able to access the same remote object from BOTH the client AND
the Server, so that I can set values to be seen by the client machines.
My question:
(1) Can this be done
(2) How can you do this
(3) Examples, if possible, please.
Thank you