如何以编程方式设置dns,如下所示进行其他配置?
<endpoint address="https://admin.icafems.com/Services/EasyStartTrackingService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IEasyStartTrackingService"
contract="ES_Service.IEasyStartTrackingService" name="WSHttpBinding_IEasyStartTrackingService">
<identity>
<dns value="admin.icafems.com" />
</identity>
</endpoint>
ServiceClient.Endpoint.Address = new EndpointAddress(ServiceURL);
ServiceClient.Endpoint.Binding = binding;
ServiceClient.Endpoint.Name = "BasicHttpBinding_ILearningSuiteService";
答案 0 :(得分:12)
将EndpointIdentity传递给EndpointAddress的构造函数