在系统中用到wcf
比如这样使用:AppWebServiceReference.AppWebServiceClient client = new AppWebServiceReference.AppWebServiceClient();
//地址今后由数据库获取
client.Endpoint.Address = new EndpointAddress("http://localhost:5002/AppWebService.svc");
BasicHttpBinding binding = (BasicHttpBinding)client.Endpoint.Binding;这样的地址http://localhost:5002/AppWebService.svc,我要怎么判断是否可用
直接把这几行代码 try catch?
比如这样使用:AppWebServiceReference.AppWebServiceClient client = new AppWebServiceReference.AppWebServiceClient();
//地址今后由数据库获取
client.Endpoint.Address = new EndpointAddress("http://localhost:5002/AppWebService.svc");
BasicHttpBinding binding = (BasicHttpBinding)client.Endpoint.Binding;这样的地址http://localhost:5002/AppWebService.svc,我要怎么判断是否可用
直接把这几行代码 try catch?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货