Uri uri = new Uri("http://172.16.238.156:8000/");
ServiceHost host = new ServiceHost(typeof(WcfServer.ChatDuplex), uri);
WSDualHttpBinding ws = new WSDualHttpBinding();
ws.Security.Mode = WSDualHttpSecurityMode.None;
host.AddServiceEndpoint(typeof(IChatDuplex), ws, "Svc");
host.Open();
MessageBox.Show("服务启动");