Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set WCF endpoint identity configuration programmatically?

Tags:

wcf

c#-4.0

How do I set dns programmatically like doing for other configuration as below?

  <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";  
like image 542
Vipul Avatar asked Dec 17 '22 12:12

Vipul


1 Answers

You pass an EndpointIdentity to the constructor of the EndpointAddress

http://msdn.microsoft.com/en-us/library/bb628618.aspx

like image 200
Richard Blewett Avatar answered May 10 '23 06:05

Richard Blewett