Esempio n. 1
0
        public static void ServicesList()
        {
            myCustomSericeHost host = new myCustomSericeHost();

            host.AddServiceEndpoint(typeof(wcfLibrary.IService), new BasicHttpBinding(), "http://localhost:4000/service/basic");
            host.AddServiceEndpoint(typeof(wcfLibrary.IService), new WSHttpBinding(), "http://localhost:4000/service/ws");
            host.AddServiceEndpoint(typeof(wcfLibrary.IService), new NetTcpBinding(), "net.tcp://localhost:4001/service/tcp");

            try
            {
                host.Open();
                printInfo(host);
                Console.ReadLine();
                host.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Console.ReadLine();
                host.Abort();
            }
        }
Esempio n. 2
0
        public static void ServicesList()
        {
            myCustomSericeHost host = new myCustomSericeHost();

            host.AddServiceEndpoint(typeof(wcfLibrary.IService), new BasicHttpBinding(), "http://localhost:4000/service/basic");
            host.AddServiceEndpoint(typeof(wcfLibrary.IService), new WSHttpBinding(), "http://localhost:4000/service/ws");
            host.AddServiceEndpoint(typeof(wcfLibrary.IService), new NetTcpBinding(), "net.tcp://localhost:4001/service/tcp");


            try
            {
                host.Open();
                printInfo(host);
                Console.ReadLine();
                host.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Console.ReadLine();
                host.Abort();
            }
        }