static void Join(object sender, JoinEventArgs e) { TcpChannel channelServ = new TcpChannel(Convert.ToInt32(e.Port)); ChannelServices.RegisterChannel(channelServ, true); RemotingConfiguration.RegisterWellKnownServiceType(typeof(ChatClient), Constants.REMOTE_CLIE_OBJ_NAME, WellKnownObjectMode.Singleton); server = (IChatServer)Activator.GetObject(typeof(IChatServer), Constants.SERVER_URL); server.join(e.Nickname, URLGenerator.generate(e.Port, Constants.REMOTE_CLIE_OBJ_NAME)); }