更新时间:2022-06-22 00:46:14
您可以轻松实现所需的目标.参见下面的代码:
You can easily achieve what you want. See code below :
Uri baseAddress = new Uri("http://localhost/CommService");
WSDualHttpBinding wsd = new WSDualHttpBinding();
EndpointAddress ea = new EndpointAddress(baseAddress, EndpointIdentity.CreateDnsIdentity("localhost"));
client = new CommServiceClient(new InstanceContext(this), wsd, ea);
让我解释一下: