2021年5月26日

WCF ServiceHost.Close时间较长问题

摘要: 在测试WCF例子时,调佣ServiceHost.Close,时间较长,而且在app.config中 CloseTimeout设置似乎与关闭时间长短没有关系, 后发现,在ServiceHost 创建后就设置ClosTimeout的值,能缩短关闭时间。 host1 = new ServiceHost(t 阅读全文

posted @ 2021-05-26 17:10 xihong 阅读(129) 评论(0) 推荐(0)

C# delegate的几种用法

摘要: 1、 Invoke(new Action(() => Invoke(new Action(() =>{if(V.Contains("E"))MessageBox.Show(" Error,try again!");elsetextBox2.Text += "Current voltage is " 阅读全文

posted @ 2021-05-26 17:05 xihong 阅读(164) 评论(0) 推荐(0)

WCF编程注意

摘要: 1、在host程序中,使用using (ServiceHost host = new ServiceHost(typeof(Service1))) { },客户端程序一直无法找到服务 改成: try { ServiceHost host1 = new ServiceHost(typeof(Servi 阅读全文

posted @ 2021-05-26 09:35 xihong 阅读(21) 评论(0) 推荐(0)

导航