Esempio n. 1
0
        public ActionResult Index()
        {
            ChannelFactory <IRequest> factory = new ChannelFactory <IRequest>(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:11001/InputRequest"));
            IRequest proxy = factory.CreateChannel();

            RequestCountInfoWCF r = proxy.Request();

            return(View(r));
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            for (int i = 0; i < 10; i++)
            {
                ChannelFactory <IRequest> factory = new ChannelFactory <IRequest>(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:11001/InputRequest"));
                IRequest            proxy         = factory.CreateChannel();
                RequestCountInfoWCF r             = proxy.Request();

                Console.WriteLine(r.Instance + " " + r.RequestCnt);
            }
            Console.ReadKey();
        }