Wednesday, 21 May 2014

How to select a service endpoint in WCF

    How to select a service endpoint in WCF

 

1.       Add a reference to a WCF service. For more information

2.       In the Code Editor, add a constructor for the service reference:
 
ServiceReference.Service1Client proxy = new ServiceReference.Service1Client()
 
 
NoteNote
Replace ServiceReference with the namespace for the service reference and replace Service1Client with the name of the service.
 
 
 
3.       An IntelliSense list will be displayed with the overloads for the constructor. Select the endpointConfigurationName As String overload.
4.       Following the overload, type = ConfigurationName, where ConfigurationName is the name of the endpoint that you want to use.


Note
If you do not know the names of the available endpoints, you can find them in the app.config file.

1 comment:

  1. Can I add service reference to another WCF service?

    ReplyDelete