static void Main(string[] args) { /*Console.WriteLine("Do you want to get cerificate?(Y/N)"); string getCertificate = Console.ReadLine(); if (getCertificate.ToUpper().Equals("Y")) { Console.WriteLine("Give me name for certificate!"); string name = Console.ReadLine(); NetTcpBinding bindingForGetCertificate = new NetTcpBinding(); string addressForGetCertificate = "net.tcp://*****:*****@"\CreateAndManageCertificate\srv.cer"))) cert)), validationType)) { Random rnd = new Random(); int sleepInterval = 0; proxy.EstablishConnection(); while (!exit) { sleepInterval = rnd.Next(1, 10); System.Threading.Thread.Sleep(sleepInterval * 1000); proxy.PingServer(DateTime.Now.TimeOfDay); } } store.Close(); }