예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient("NetNamedPipeBinding_IHelloIndigoService");
            string s = proxy.HelloIndigo("Hello over named pipes protocol with NetNamedPipeBinding!");

            MessageBox.Show(s);
        }
예제 #2
0
 static void Main(string[] args)
 {
     using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient())
     {
         string s = proxy.HelloIndigo("Hello from client...");
         Console.WriteLine(s);
         Console.ReadLine();
     }
 }
예제 #3
0
        static void Main(string[] args)
        {
            localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient();
            string s = proxy.HelloIndigo();

            Console.WriteLine(s);
            Console.WriteLine("Press <ENTER> to terminate Client.");
            Console.ReadLine();
        }
예제 #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient("BasicHttpBinding_IHelloIndigoService");
            string s = proxy.HelloIndigo("Hello over HTTP protocol with BasicHttpBinding!");
            MessageBox.Show(s);

            proxy = new Client.localhost.HelloIndigoServiceClient("WSHttpBinding_IHelloIndigoService");
            s = proxy.HelloIndigo("Hello over HTTP protocol with WSHttpBinding!");
            MessageBox.Show(s);
        }
예제 #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient("BasicHttpBinding_IHelloIndigoService");
            string s = proxy.HelloIndigo("Hello over HTTP protocol with BasicHttpBinding!");

            MessageBox.Show(s);


            proxy = new Client.localhost.HelloIndigoServiceClient("WSHttpBinding_IHelloIndigoService");
            s     = proxy.HelloIndigo("Hello over HTTP protocol with WSHttpBinding!");
            MessageBox.Show(s);
        }
예제 #6
0
        static void Main(string[] args)
        {
            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient())
            {
                string s = proxy.HelloIndigo("SubjectKey");
                Console.WriteLine(s);
                Console.ReadLine();

                s = proxy.HelloIndigo("InvalidKey"); // exception here
                Console.WriteLine(s);
                Console.ReadLine();
            }
        }
예제 #7
0
        static void Main(string[] args)
        {
            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient("BasicHttpBinding_IHelloIndigoService"))
            {
                string s = proxy.HelloIndigo("Hello over BasicHttpBinding!");
                Console.WriteLine(s);
            }

            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient("WSHttpBinding_IHelloIndigoService"))
            {
                string s = proxy.HelloIndigo("Hello over WSHttpBinding!");
                Console.WriteLine(s);
            }

            Console.ReadLine();
        }
예제 #8
0
        static void Main(string[] args)
        {
            //EndpointAddress ep =
            //    new EndpointAddress("http://localhost:8000/HelloIndigo/HelloIndigoService");

            //IHelloIndigoService proxy =
            //    ChannelFactory<IHelloIndigoService>.CreateChannel(new BasicHttpBinding(), ep);



            localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient();

            string s = proxy.HelloIndigo();

            Console.WriteLine(s);

            Console.WriteLine("Press [Enter] to terminate Client");
            Console.ReadLine();
        }
예제 #9
0
        static void Main(string[] args)
        {
            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient())
            {
                Console.WriteLine("Enter a valid Windows account...");
                Console.WriteLine();

                Console.Write("Username:"******"Password:"******"Hello!");
                Console.WriteLine(s);
                Console.ReadLine();
            }
        }
예제 #10
0
        static void Main(string[] args)
        {
            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient())
            {
                NetworkCredential creds = new NetworkCredential("username", "password", "domain");

                proxy.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Identification;
                proxy.ClientCredentials.Windows.AllowNtlm = true;

                // TODO: before uncommenting this next line,
                // set the NetworkCredential to the correct values
                // for your workgroup or domain

                //proxy.ClientCredentials.Windows.ClientCredential = creds;

                string s = proxy.HelloIndigo("Hello from Client");
                Console.WriteLine(s);
                Console.ReadLine();
            }
        }
예제 #11
0
파일: Program.cs 프로젝트: ssickles/archive
        static void Main(string[] args)
        {
            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient())
            {
                NetworkCredential creds = new NetworkCredential("username", "password", "domain");

                proxy.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Identification;
                proxy.ClientCredentials.Windows.AllowNtlm = true;
                
                // TODO: before uncommenting this next line, 
                // set the NetworkCredential to the correct values 
                // for your workgroup or domain

                //proxy.ClientCredentials.Windows.ClientCredential = creds;

                string s = proxy.HelloIndigo("Hello from Client");
                Console.WriteLine(s);
                Console.ReadLine();
            }


        }
예제 #12
0
 private void button3_Click(object sender, EventArgs e)
 {
     localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient("NetNamedPipeBinding_IHelloIndigoService");
     string s = proxy.HelloIndigo("Hello over named pipes protocol with NetNamedPipeBinding!");
     MessageBox.Show(s);
 }