客户端动态调用wcf引用地址

ServiceReference1.Service1Client clinent = new ServiceReference1.Service1Client();

string ClinicIp = getAreaIp(AreaName).Trim() ;

clinent.Endpoint.Address = new EndpointAddress(new Uri(string.Format("http://{0}:8585/wcf1",ClinicIp)));

clinent .getName();

你可能感兴趣的:(C#)