コード例 #1
0
        private bool Connect(String host)
        {
            Console.WriteLine("Connecting to PractiSES root server ({0})...", host);
            rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root");
            try
            {
                if (rootServer.Hello())
                {
                    Console.WriteLine("Connected to PractiSES root server.");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Unable to connect to PractiSES root server.");
                return(false);
            }

            /*Console.Write("Domain Name: ");
             * String domainName = Console.ReadLine();
             * GetCertificate(domainName);*/

            return(true);
        }
コード例 #2
0
ファイル: ServerObject.cs プロジェクト: mergun/practises
        /*private X509Certificate2 GetCertificate(String domainName)
         * {
         *  return rootServer.GetCertificate(domainName);
         * }*/

        private bool ConnectRootServer(String host)
        {
            ActionLog_Write("Connecting to PractiSES root server (" + host + ")...");
            Console.WriteLine("Connecting to PractiSES root server ({0})...", host);

            rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root");

            try
            {
                if (rootServer.Hello())
                {
                    ActionLog_Write("Connected to PractiSES root server..");
                    Console.WriteLine("Connected to PractiSES root server.");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message + "\nUnable to connect to PractiSES root server.");
                return(false);
            }

            return(true);
        }
コード例 #3
0
ファイル: Server.cs プロジェクト: cbguder/practises
        private bool Connect(String host)
        {
            Console.WriteLine("Connecting to PractiSES root server ({0})...", host);
            rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root");
            try
            {
                if (rootServer.Hello())
                {
                    Console.WriteLine("Connected to PractiSES root server.");
                }
            }
            catch(Exception e)
            {
                Console.WriteLine("Unable to connect to PractiSES root server.");
                return false;
            }

            /*Console.Write("Domain Name: ");
            String domainName = Console.ReadLine();
            GetCertificate(domainName);*/

            return true;
        }
コード例 #4
0
ファイル: ServerObject.cs プロジェクト: cbguder/practises
        /*private X509Certificate2 GetCertificate(String domainName)
        {
            return rootServer.GetCertificate(domainName);
        }*/
        private bool ConnectRootServer(String host)
        {
            ActionLog_Write("Connecting to PractiSES root server (" + host + ")...");
            Console.WriteLine("Connecting to PractiSES root server ({0})...", host);

            rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root");

            try
            {
                if (rootServer.Hello())
                {
                    ActionLog_Write("Connected to PractiSES root server..");
                    Console.WriteLine("Connected to PractiSES root server.");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message + "\nUnable to connect to PractiSES root server.");
                return false;
            }

            return true;
        }