using(ServiceHost host=new ServiceHost(typeof(HelloWordService))) { host.AddServiceEndpoint(typeof(IHelloWordService), new BasicHttpBinding(), new Uri("http://localhost:10000/HelloWorldService")); host.AddServiceEndpoint(typeof(IHelloWordService), new NetTcpBinding(), new Uri("net.tcp://localhost:10001/HelloWorldService"));
if (host.State != CommunicationState.Opening) host.Open(); }