Adding multiple end point in WCF

Posted by Riyazhaider under WCF on 1/24/2014 | Points: 10 | Views : 1320 | Status : [Member] | Replies : 3
I am new to WCF. i am creating a WCF service which provide data for
windows form user(nettcp) and web form user (http) how to add endpoint.




Responses

Posted by: Learningtorise on: 1/24/2014 [Member] Starter | Points: 25

Up
0
Down
Bindings specify how a Windows Communication Foundation (WCF) service endpoint communicates with other endpoints. At its most basic, a binding must specify the transport (for example, HTTP or TCP) to use.

You can define or configure bindings through code or configuration. These two approaches are independent of the type of binding used. Using code gives you complete control over the definition of a binding when you compile. Note that if the binding is defined in code, it overwrites any configuration-based definitions made in the configuration file.
In Short, there are two approaches in your case: Binding can be defined using either "code" way,
http://msdn.microsoft.com/en-us/library/ms731758(v=vs.100).aspx
OR
using Configuration way, which will allow a system administrator or the user of a WCF service or client to change the parameters of bindings,
http://msdn.microsoft.com/en-us/library/ms734663(v=vs.100).aspx

More on Bindings:
http://msdn.microsoft.com/en-us/library/ms733865(v=vs.100).aspx


http://hashtagakash.wordpress.com/

Riyazhaider, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arun7331 on: 9/11/2014 [Member] Starter | Points: 25

Up
0
Down
It can be either way. It is not clear, the multiple endpoints will be at client or service. Anyways multiple endpoint in a service would look like this.



<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IBook" />
</basicHttpBinding>
</bindings>


<services>
<service name="namespace.yourserivce">
<endpoint address="http://localhost:1995/csharp/Book.svc"
binding="basicHttpBinding"
contract="ServiceReference_Books.IBook"
name="BasicHttpBinding_IBook" />
<endpoint address=" http://localhost:1995/csharp/BookDetails.svc "
binding=" netTcpBinding"
bindingConfiguration=" BasicHttpBinding_IBook "
contract=" ServiceReference_BookDetails.IBookDetails ">
</endpoint>
</service>
</services>


Get more details on endpoints here. http://www.encodedna.com/wcf/tutorial/what-is-an-endpoint-in-wcf.htm
Find out how to implement the services using a Client app. http://www.encodedna.com/wcf/tutorial/wcf-message-contract-fundamentals.htm



Riyazhaider, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenhcl on: 9/11/2014 [Member] Starter | Points: 25

Up
0
Down
Hi,

Refer below links it describes how to add multiple end points in WCF.
http://msdn.microsoft.com/en-us/library/ms751515(v=vs.110).aspx
http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/configuring-multiple-end-points-for-wcf-service/

Riyazhaider, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response