예제 #1
0
        private static void Main(string[] args)
        {
            ServiceClient serviceClient = new ServiceClient();
            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(IgnoreCertificateErrorHandler);

            serviceClient.ClientCredentials.UserName.UserName = "******";
            serviceClient.ClientCredentials.UserName.Password = "******";

            string isOK = serviceClient.GetData();

            Console.WriteLine(isOK);
            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            ServiceClient client = new ServiceClient();

            try
            {
                client.Open();
                writeConsole(client.GetData(3));
                client.Close();
            }
            catch
            {
            }

            System.Threading.Thread.Sleep(5000);
        }