public Form1() { InitializeComponent(); TcpChannel channel = new TcpChannel(); ChannelServices.RegisterChannel(channel); client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject(typeof(IHelloRemotingService.IHelloRemotingService), "tcp://localhost:8080/GetMessage"); }
public MainWindow() { InitializeComponent(); TcpChannel channel = new TcpChannel(); client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject (typeof(IHelloRemotingService.IHelloRemotingService), "tcp://localhost:8090/GetMessage"); }
private void RegisterClient() { TcpChannel channel = new TcpChannel(); #pragma warning disable CS0618 // Type or member is obsolete ChannelServices.RegisterChannel(channel); #pragma warning restore CS0618 // Type or member is obsolete client = (IHelloRemotingService.IHelloRemotingService)Activator.GetObject(typeof(IHelloRemotingService.IHelloRemotingService), "tcp://localhost:45012/GetMessage"); System.Diagnostics.Debug.Assert(client != null); }