代码如下: using (ServiceHost DuplexCommonHost = new ServiceHost(typeof(DuplexCommonService)), OneWayCommonHost = new ServiceHost(typeof(OneWayCommonService))) { DuplexCommonHost.Opened += delegate { Console.Write("DuplexCommon service has been opened!"); }; DuplexCommonHost.Open(); OneWayCommonHost.Opened += delegate { Console.Write("OneWayCommon service has been opened!"); }; OneWayCommonHost.Open(); Console.Read(); }结果客户端报一下错误:没有终结点在侦听可以接受消息的 http://localhost:8080/OneWayCommon屏蔽红色部分代码,客户端正常运行。
1 回答
- 1 回答
- 0 关注
- 608 浏览
添加回答
举报
0/150
提交
取消