public string IsServerActive() { return "SUCCESS"; }
private bool IsServerExists(string ServerIP, string ServerPort) { try { bool connectionStatus = false; ChannelServices.RegisterChannel(new TcpClientChannel(),false); Type requiredType = typeof(IServerInterface); IServerInterface gblRemoteObject = (IServerInterface)Activator.GetObject(requiredType, "tcp://" + ServerIP + ":" + ServerPort + "/ServerRequest"); if (gblRemoteObject.IsServerActive().Trim() == "SUCCESS") connectionStatus = true; return connectionStatus; } catch { return false; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)