Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

i have single service which has to call to differenct client address.now i have code which call single client and comunicate.i need to make same service to two client .how can i add another client endpoint in config file please any help?
here is my configuration.

XML
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IFileTransfer" />
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:51783/FileTransfer.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IFileTransfer"
        contract="ServiceReference1.IFileTransfer" name="BasicHttpBinding_IFileTransfer" /> 
      
    </client>
    <services> 
      <service name="LeapServer.Service1">
        <endpoint address="" binding="basicHttpBinding" contract="LeapServer.IService1">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8737/Design_Time_Addresses/LeapServer/Service1/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>


What I have tried:

i have tried http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/dealing-multiple-endpoints-of-a-wcf-service499/
but not working..
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900