示例#1
0
        static void Main(string[] args)
        {
            using (localhost.SecureServiceContractClient proxy = new Client.localhost.SecureServiceContractClient())
            {
                string s = proxy.SendMessage("Hello from Client.");
                Console.WriteLine(s);
            }

            Console.ReadLine();
        }
示例#2
0
        static void Main(string[] args)
        {
            using (localhost.SecureServiceContractClient proxy = new Client.localhost.SecureServiceContractClient())
            {
                proxy.ClientCredentials.UserName.UserName = "******";
                proxy.ClientCredentials.UserName.Password = "******";

                string s = proxy.AdminOperation();
                Console.WriteLine(s);

                s = proxy.UserOperation();
                Console.WriteLine(s);

                s = proxy.GuestOperation();
                Console.WriteLine(s);
            }
            Console.ReadLine();
        }