WCF编程注意

1、在host程序中,使用using (ServiceHost host = new ServiceHost(typeof(Service1))) { },客户端程序一直无法找到服务

     改成: 

  try
  {
    ServiceHost host1 = new ServiceHost(typeof(Service1));

          。。。
  }
  catch (Exception ex)
  {
    MessageBox.Show(ex.ToString());
  }

posted on 2021-05-26 09:35  xihong  阅读(21)  评论(0)    收藏  举报

导航