Hi,
I'm trying to make ( using Remoting services ), a proxy ( which acts as
a client and a server ). My problem is how can I register a channel on
a particular port for the server part and at the same time register a
channel for client part ?
code :
public void CreateClientAndServer()
{
// Server part
// ============================
HttpChannel c = new HttpChannel(32469);
ChannelServices.RegisterChannel(c, false);
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(ServerClass),
"ServerMsgObj.soap",
WellKnownObjectMode.Singleton);
// Client part
// ============================
HttpChannel c2 = new HttpChannel();
ChannelServices.RegisterChannel(c2, false);
object remoteObj = Activator.GetObject(
typeof(MyOtherServerClass),
"http://localhost:35000/MyOtherServerObj.soap");
MyOtherServerClass obj = (MyOtherServerClass)remoteObj;
obj.DisplayMessage("Hello from the client!");
}
The problem is that I cannot register 2 Http channels !!
Any ideas ?
Thanks.
GizMo.