使用了配置文件,都是在配置文件中配置的信息,要动态使用远程IP地址,
string strip; //ip地址
string strport; //端口 NetTcpBinding myBinding = new NetTcpBinding();
myBinding.Security.Mode = SecurityMode.None; string uri = "net.tcp://" + strip + ":" + strport + "/net"; EndpointAddress ea = new EndpointAddress(uri); WCFServicesClient client = new WCFServicesClient(myBinding, ea);//在调用时报错: 不支持正在使用的 .Net 组帧模式。等待......
string strip; //ip地址
string strport; //端口 NetTcpBinding myBinding = new NetTcpBinding();
myBinding.Security.Mode = SecurityMode.None; string uri = "net.tcp://" + strip + ":" + strport + "/net"; EndpointAddress ea = new EndpointAddress(uri); WCFServicesClient client = new WCFServicesClient(myBinding, ea);//在调用时报错: 不支持正在使用的 .Net 组帧模式。等待......
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货