我该如何以编程方式设置WCF终结点身份验证配置?

5
我该如何以编程方式设置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";  
1个回答

12

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接