Ejemplo n.º 1
0
        public string GetData(int value)
        {
            Console.WriteLine("enter get data");
            Service1Reference.Service1Client client = new Service1Reference.Service1Client();
            var response = client.GetData(1);

            Console.WriteLine("response from WcfServer " + response);
            return(string.Format("You entered: {0}", value));
        }
Ejemplo n.º 2
0
        static void DoWork()
        {
            Console.WriteLine("Do work enter");
            Service1Reference.Service1Client client = new Service1Reference.Service1Client();

            for (int i = 0; i < 100; i++)
            {
                //Service1Reference.Service1Client client = new Service1Reference.Service1Client();
                try
                {
                    var response = client.GetData(i);
                    Console.WriteLine("response from WcfServer " + response);
                }
                catch (Exception ex)
                { Console.WriteLine("exception on " + ex);
                  client = new Service1Reference.Service1Client(); }
            }
        }