public void makeConnection(int primaryPort) { try { String url = "tcp://localhost:" + primaryPort + "/" + "Server"; _primaryServer = (IDataServer)Activator.GetObject(typeof(IDataServer), url); _primaryServer.connect(_slavePort); pingService = new Ping(_primaryServer, this); pingService.StartSend(); } catch (RemotingException re) { Console.WriteLine("[makeConnection]:\n" + re); throw new OperationException("Server " + name + "cannot makeConnection: MasterServer is not avaiable to connect."); } }