Exemplo n.º 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);
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 11
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();
            }


        }
Exemplo n.º 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);
 }