Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Uri tcpUri = new Uri("http://localhost:8000/MyService");

            EndpointAddress  address = new EndpointAddress(tcpUri);
            BasicHttpBinding binding = new BasicHttpBinding();

            ChannelFactory <IMyService> factory = new ChannelFactory <IMyService>(binding, address);

            IMyService service = factory.CreateChannel();

            if (service.AuthenticationMode(textBox1.Text, textBox2.Text))
            {
                richTextBox1.Text = "Аунтефикация пройдена\n";
                string ch = service.readxml("");
                richTextBox1.Text += "пользователь-Zooker";
                richTextBox1.Text += "Сообщение-" + ch;
            }


            else
            {
                richTextBox1.Text = "Не верный логин или пароль";
            }
        }