title: How do I set WCF endpoint identity configuration programmatically?
body: <p>How do I set dns programmatically like doing for other configuration as below?</p>
  
  <pre><code>  &lt;endpoint address="https://admin.icafems.com/Services/EasyStartTrackingService.svc"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IEasyStartTrackingService"
        contract="ES_Service.IEasyStartTrackingService" name="WSHttpBinding_IEasyStartTrackingService"&gt;
      &lt;identity&gt;
        &lt;dns value="admin.icafems.com" /&gt;
      &lt;/identity&gt;
    &lt;/endpoint&gt;
  
      ServiceClient.Endpoint.Address = new EndpointAddress(ServiceURL);            
      ServiceClient.Endpoint.Binding = binding;
      ServiceClient.Endpoint.Name = "BasicHttpBinding_ILearningSuiteService";  
  </code></pre>