You are on page 1of 19

ABC of Bindings in WCF

Author: Deepali Tukare

Page 1 of 19
Table of contents

Introduction 3
The ABC of Windows Communication Foundation!!! 3
Configuring System-Provided Bindings and Types of Binding 4
How to: Specify a Service Binding in Configuration 8
To specify the BasicHttpBinding to use to configure the service 8
To specify in code to use the BasicHttpBinding for the service 10
How to: Specify a Client Binding in Configuration 12
To specify a custom binding in code and Binding configuration Summary 16
References 19

Page 2 of 19
Introduction:
This Whitepaper gives a brief explanation on the basic concepts of the Communication part in the WCF
(Windows Communication Foundation).In order to communicate with a WCF service, the client needs to
know simple details like ABC of the service.

The ABC of Windows Communication Foundation!!!


Before we learn the ABC of WCF, we need to know how a WCF service is made accessible to the clients
A WCF service allows communication through an Endpoint & the endpoint is the only point of
communication of the WCF service that enables message exchange with the client as shown in Figure 1.

Figure 1

This Endpoint needs to set the ABC attributes of the WCF service as shown in Figure 2.

Figure 2

Thus in the WCF world, ABC is an abbreviation of Address, Binding and Contract attributes of an
Endpoint.

An example of the Endpoint:

Example of an endpoint setting in the web.config file at the service side.


<!-- Endpoint settings in WCF service -->
<endpoint address="http://localhost:8731/EmployeeWCFService.ServiceImplementation.Manager/"
binding="basicHttpBinding"
contract="EmployeeWCFService.ServiceContract.IEmployee" />

Where, address is the network address of the service, binding specifies transport protocol (HTTP, TCP,
etc.) selected for the service and contract is the interface the service implements.

For the purpose of this Whitepaper, we are going to emphasize on the Binding part of the WCF
communication mechanism.

So, what is the Binding?

Page 3 of 19
The Binding is an attribute of an endpoint and it lets you configure transport protocol, encoding and
security requirements as shown in Figure 3

Figure 3

Configuring System-Provided Bindings


Bindings consist of elements that define how the Windows Communication Foundation (WCF) channels
are layered up to provide the required communication features. A binding contains three types of
elements:

Protocol channel binding elements, which determine the security, reliability, context flow settings,
or user-defined protocols to use with messages that are sent to the endpoint.

Transport channel binding elements, which determine the underlying transport protocol to use
when sending messages to the endpoint, for example, TCP or HTTP.

Message encoding binding elements, which determine the wire encoding to use for messages
that are sent to the endpoint, for example, text/XML, binary, or Message Transmission
Optimization Mechanism (MTOM).

Types of Binding
The goal of WCF is to unify the way distributed systems are developed prior to release of .Net Framework
3.0. WCF offers a single development framework for all scenarios where distributed solutions were
implemented using different technologies such as ASMX web services, .Net Remoting, COM+, etc. WCF
achieves this by configuring binding attributes of an endpoint. WCF lets you choose HTTP or TCP
transport protocol, encoding, etc. just by tweaking the value of binding attribute for an endpoint.
To cater to different transport protocols, WCF lets you select HTTP, TCP and MSMQ binding types.

BasicHttpBinding:

This type of binding exists in new .Net world only to support backward compatibility with ASMX based
clients (WS-Basic Profile 1.1). Basic http binding sends SOAP 1.1 messages and is used when there is a
requirement for the WCF services to communicate with non WCF based systems. Thus, providing an
endpoint with basicHttpBinding makes interoperating with other basic implementations of web services a
great choice.

Note: All other bindings except basicHttpBinding support WS* specifications including security, reliable
messaging and transaction support, where appropriate.

How to setup the basicHttpBinding?

Let us examine how to setup binding for an endpoint in the web.config file.

Page 4 of 19
Step 1: Choose basicHttpBinding as a value in the binding attribute of an endpoint.

<endpoint
address="http://localhost:8731/EmployeeWCFService.ServiceImplementation.Manager/"
binding="basicHttpBinding"
bindingConfiguration="basicBinding"
contract=" EmployeeWCFService.ServiceContract.IEmployee">

Step 2: This step is optional and is only required if the binding's default properties need to be modified, as
shown in the example below. In this case, name the binding same as bindingConfiguration attribute in the
endpoint section.

<bindings>|
<basicHttpBinding>
<binding name="basicBinding"
textEncoding="utf-8"
openTimeout="00:03:00"
closeTimeout="00:03:00"
/>

</basicHttpBinding>
</bindings>

Note: All other types of binding are setup in the same way.

wsHttpBinding

This binding sends SOAP 1.2 messages and implements WS* specifications to support enterprise
requirements of security, reliability, ordered delivery and transaction management.

netTcpBinding

This binding sends SOAP 1.2 messages, provides binary encoding and optimized communication
between WCF services and WCF clients on Windows network. This binding is the fastest binding
amongst all WCF binding options between different nodes in the TCP network. Unlike http bindings, the
TCP binding does not offer interoperability but is highly optimized for .Net 3.0 and above clients. Thus,
in .Net version 3.0 and above, providing an endpoint with netTcpBinding is an easy option to development
of distributed systems and can replace COM+ and .Net Remoting model.

netNamedPipeBinding

This binding is used to provide secure and reliable Named Pipe based communication between WCF
services and WCF client on the same machine. It is the ideal choice for communication between
processes on the same machine.

The following bindings are shipped with WCF.

Binding Configuration Element Description

BasicHttpBinding <basicHttpBinding> A binding that is suitable for


communicating with WS-Basic Profile
conformant Web services, for
example, ASP.NET Web services

Page 5 of 19
(ASMX)-based services. This binding
uses HTTP as the transport and
text/XML as the default message
encoding.

WSHttpBinding <wsHttpBinding> A secure and interoperable binding


that is suitable for non-duplex service
contracts.

WS2007HttpBinding <ws2007HttpBinding> A secure and interoperable binding


that provides support for the correct
versions of the Security,
ReliableSession, and
TransactionFlow binding elements.

WSDualHttpBinding <wsDualHttpBinding> A secure and interoperable binding


that is suitable for duplex service
contracts or communication through
SOAP intermediaries.

WSFederationHttpBinding <wsFederationHttpBinding> A secure and interoperable binding


that supports the WS-Federation
protocol, enabling organizations that
are in a federation to efficiently
authenticate and authorize users.

WS2007FederationHttpBindin <ws2007FederationHttpBinding A secure and interoperable binding


g > that derives from
WS2007HttpBinding and supports
federated security.

NetTcpBinding <netTcpBinding> A secure and optimized binding


suitable for cross-machine
communication between WCF
applications.

NetNamedPipeBinding <netNamedPipeBinding> A secure, reliable, optimized binding


that is suitable for on-machine
communication between WCF
applications.

NetMsmqBinding <netMsmqBinding> A queued binding that is suitable for

Page 6 of 19
cross-machine communication
between WCF applications.

NetPeerTcpBinding <netPeerTcpBinding> A binding that enables secure, multi-


machine communication.

WebHttpBinding <webHttpBinding> A binding used to configure endpoints


for WCF Web services that are
exposed through HTTP requests
instead of SOAP messages.

MsmqIntegrationBinding <msmqIntegrationBinding> A binding that is suitable for cross-


machine communication between a
WCF application and existing
Message Queuing (also known as
MSMQ) applications.

Thumb rules in choosing endpoint' binding

If you require your service to be consumed by clients compatible with SOAP 1.1, use
basicHttpBinding for interoperability

If you require your service to be consumed within the corporate network, use netTCPBinding for
performance

If you require your service to be consumed over the internet and the client is a WCF compatible,
use wsHttpBinding to reap full benefits of WS* specifications

If you require your service to be accessible only in the same machine, use netNamedPipeBinding

If you require your service to be queue messages, use netMsmqBinding

If you require your service to act as server as well as client in a peer to peer environment, utilize
netPeerTcpBinding setting

How to: Specify a Service Binding in Configuration


In this example, an ICalculator contract is defined for a basic calculator service, the service is
implemented in the CalculatorService class, and then its endpoint is configured in the Web.config file,
where it is specified that the service uses the BasicHttpBinding.

It is usually the best practice to specify the binding and address information declaratively in configuration
rather than imperatively in code. Defining endpoints in code is usually not practical because the bindings

Page 7 of 19
and addresses for a deployed service are typically different from those used while the service is being
developed. More generally, keeping the binding and addressing information out of the code allows them
to change without having to recompile or redeploy the application.

All of the following configuration steps can be undertaken using the Configuration Editor Tool
(SvcConfigEditor.exe).

For the source copy of this example, see Basic Binding Samples.

To specify the BasicHttpBinding to use to configure


the service
1. Define a service contract for the type of service.
[ServiceContract]
public interface ICalculator
{
[OperationContract]
double Add(double n1, double n2);
[OperationContract]
double Subtract(double n1, double n2);
[OperationContract]
double Multiply(double n1, double n2);
[OperationContract]
double Divide(double n1, double n2);
}

2.Implement the service contract in a service class.


public class CalculatorService : ICalculator
{
public double Add(double n1, double n2)
{
return n1 + n2;
}
public double Subtract(double n1, double n2)
{
return n1 - n2;
}

public double Multiply(double n1, double n2)


{
return n1 * n2;
}
public double Divide(double n1, double n2)
{
return n1 / n2;
}

Note:

Address or binding information is not specified inside the implementation of the service. Also, code
does not have to be written to fetch that information from the configuration file.

Page 8 of 19
}
1.Create a Web.config file to configure an endpoint for the CalculatorService that uses the
WSHttpBinding.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name=" CalculatorService" >
<endpoint
<-- Leave the address blank to be populated by default-->
<--from the hosting environment,in this case IIS, so -->
<-- the address will just be that of the IIS Virtual -->
<--Directory.-->
address=""
<--Specify the binding type -->
binding="wsHttpBinding"
<--Specify the binding configuration name for that -->
<--binding type. This is optional but useful if you -->
<--want to modify the properties of the binding. -->
<--The bindingConfiguration name Binding1 is defined -->
<--below in the bindings element. -->
bindingConfiguration="Binding1"
contract="ICalculator" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="Binding1">
<-- Binding property values can be modified here. -->
<--See the next procedure. -->
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
</configuration>

1. Create a Service.svc file that contains the following line and place it in your Internet Information
Services (IIS) virtual directory.

<%@ServiceHost language=c# Service="CalculatorService" %>

To modify the default values of the binding properties


To modify one of the default property values of the WSHttpBinding, create a new binding
configuration name - <binding name="Binding1"> - within the <wsHttpBinding> element and set the
new values for the attributes of the binding in this binding element. For example, to change the
default open and close timeout values of 1 minute to 2 minutes, add the following to the
configuration file.
<wsHttpBinding>
<binding name="Binding1"
closeTimeout="00:02:00"
openTimeout="00:02:00">
</binding>
Page 9 of 19
</wsHttpBinding>
In this example, an ICalculator contract is defined for a calculator service, the service is implemented in
the CalculatorService class, and then its endpoint is defined in code, where it is specified that the
service must use the BasicHttpBinding class.

It is usually the best practice to specify the binding and address information declaratively in configuration
rather than imperatively in code. Defining endpoints in code is usually not practical because the bindings
and addresses for a deployed service are typically different from those used while the service is being
developed. More generally, keeping the binding and addressing information out of the code allows them
to change without having to recompile or redeploy the application.

For a description of how to configure this service using configuration elements instead of code, see How
to: Specify a Service Binding in Configuration.

To specify in code to use the BasicHttpBinding for the


service
1. Define a service contract for the type of service.

[ServiceContract]
public interface ICalculator
{
[OperationContract]
double Add(double n1, double n2);
[OperationContract]
double Subtract(double n1, double n2);
[OperationContract]
double Multiply(double n1, double n2);
[OperationContract]
double Divide(double n1, double n2);
}
2. Implement the service contract in a service class.

public class CalculatorService : ICalculator


{
public double Add(double n1, double n2)
{
return n1 + n2;
}
public double Subtract(double n1, double n2)
{
return n1 - n2;
}
public double Multiply(double n1, double n2)
{
return n1 * n2;
}
public double Divide(double n1, double n2)
{
return n1 / n2;
}
Page 10 of 19
}
3. In the hosting application, create the base address for the service and the binding to use with the
service.

// Specify a base address for the service


String baseAddress = "http://localhost/CalculatorService";
// Create the binding to be used by the service.
BasicHttpBinding binding1 = new BasicHttpBinding();
4. Create the host for the service, add the endpoint, and then open the host.

using(ServiceHost host = new ServiceHost(typeof(CalculatorService)))


{
host.AddServiceEndpoint(typeof(ICalculator),binding1, baseAddress);
host.Open();
}

To modify the default values of the binding properties:


1. To modify one of the default property values of the BasicHttpBinding class, set the property
value on the binding to the new value before creating the host. For example, to change the
default open and close timeout values of 1 minute to 2 minutes, use the following.

TimeSpan modifiedCloseTimeout = new TimeSpan(00, 02, 00);


binding1.CloseTimeout = modifiedCloseTimeout;

How to: Specify a Client Binding in Configuration


In this example, a client console application is created to use a calculator service, and the binding for that
client is specified declaratively in configuration. The client accesses the CalculatorService, which
implements the ICalculator interface, and both the service and the client use the BasicHttpBinding class.

The procedure outlined assumes that the calculator service is running. For information about how to build
the service, see How to: Specify a Service Binding in Configuration. It also uses the ServiceModel
Metadata Utility Tool (Svcutil.exe) that Windows Communication Foundation (WCF) provides to
automatically generate the client components. The tool generates the client code and configuration for
accessing the service.

The client is built in two parts. Svcutil.exe generates the ClientCalculator that implements the
ICalculator interface. This client application is then constructed by constructing an instance of
ClientCalculator.

It is usually the best practice to specify the binding and address information declaratively in configuration
rather than imperatively in code. Defining endpoints in code is usually not practical because the bindings
and addresses for a deployed service are typically different from those used while the service is being
developed. More generally, keeping the binding and addressing information out of the code allows them
to change without having to recompile or redeploy the application.

You can perform all of the following configuration steps by using the Configuration Editor Tool
(SvcConfigEditor.exe).
Page 11 of 19
For the source copy of this example, see the Basic Binding sample.

Specifying a client binding in configuration


1. Use Svcutil.exe from the command line to generate code from service metadata.

Svcutil.exe <service's Metadata Exchange (MEX) address or HTTP GET address>

2. The client that is generated contains the ICalculator interface that defines the service contract
that the client implementation must satisfy.

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel",
"3.0.0.0")]

[System.ServiceModel.ServiceContractAttribute(Namespace="http://Microsoft.ServiceModel.Sa
mples", ConfigurationName="Microsoft.ServiceModel.Samples.ICalculator")]
public interface ICalculator
{ [System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.ServiceModel.Sam
ples/ICalculator/Add",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/AddResponse")]
double Add(double n1, double n2);

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.ServiceModel.Sampl
es/ICalculator/Subtract",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/SubtractResponse")]
double Subtract(double n1, double n2);

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.ServiceModel.Sampl
es/ICalculator/Multiply",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/MultiplyResponse")]
double Multiply(double n1, double n2);

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.ServiceModel.Sampl
es/ICalculator/Divide",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/DivideResponse")]
double Divide(double n1, double n2);
}

3. The generated client also contains the implementation of the ClientCalculator.

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
public partial class CalculatorClient :
System.ServiceModel.ClientBase<Microsoft.ServiceModel.Samples.ICalculator>,
Microsoft.ServiceModel.Samples.ICalculator
{

public CalculatorClient()

Page 12 of 19
{
}

public CalculatorClient(string endpointConfigurationName) :


base(endpointConfigurationName)
{
}

public CalculatorClient(string endpointConfigurationName, string remoteAddress) :


base(endpointConfigurationName, remoteAddress)
{
}

public CalculatorClient(string endpointConfigurationName,


System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}

public CalculatorClient(System.ServiceModel.Channels.Binding binding,


System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}

public double Add(double n1, double n2)


{
return base.Channel.Add(n1, n2);
}

public double Subtract(double n1, double n2)


{
return base.Channel.Subtract(n1, n2);
}

public double Multiply(double n1, double n2)


{
return base.Channel.Multiply(n1, n2);
}

public double Divide(double n1, double n2)


{
return base.Channel.Divide(n1, n2);
}
}

4. Svcutil.exe also generates the configuration for the client that uses the BasicHttpBinding class.
When using Visual Studio, name this file App.config. Note that the address and binding
information are not specified anywhere inside the implementation of the service. Also, code does
not have to be written to retrieve that information from the configuration file.

<?xml version="1.0" encoding="utf-8" ?>


<configuration>
Page 13 of 19
<system.serviceModel>

<client>
<endpoint
name=""
address="http://localhost/servicemodelsamples/service.svc"
binding="basicHttpBinding"
contract="Microsoft.ServiceModel.Samples.ICalculator" />
</client>

<bindings>
<basicHttpBinding/>
</bindings>

</system.serviceModel>

</configuration>
5. Create an instance of the ClientCalculator in an application, and then call the service operations.

using System;
using System.ServiceModel;

namespace Microsoft.ServiceModel.Samples
{

//Client implementation code.


class Client
{
static void Main()
{
// Create a client with given client endpoint configuration
CalculatorClient client = new CalculatorClient();

// Call the Add service operation.


double value1 = 100.00D;
double value2 = 15.99D;
double result = client.Add(value1, value2);
Console.WriteLine("Add({0},{1}) = {2}", value1, value2, result);

// Call the Subtract service operation.


value1 = 145.00D;
value2 = 76.54D;
result = client.Subtract(value1, value2);
Console.WriteLine("Subtract({0},{1}) = {2}", value1, value2, result);

// Call the Multiply service operation.


value1 = 9.00D;
value2 = 81.25D;
result = client.Multiply(value1, value2);
Console.WriteLine("Multiply({0},{1}) = {2}", value1, value2, result);

// Call the Divide service operation.


value1 = 22.00D;
Page 14 of 19
value2 = 7.00D;
result = client.Divide(value1, value2);
Console.WriteLine("Divide({0},{1}) = {2}", value1, value2, result);

//Closing the client gracefully closes the connection and cleans up resources
client.Close();

Console.WriteLine();
Console.WriteLine("Press <ENTER> to terminate client.");
Console.ReadLine();
}
}
}
6. Compile and run the client.

In this example, a client is created to use a calculator service and the binding for that client is specified
imperatively in code. The client accesses the CalculatorService, which implements the ICalculator
interface, and both the service and the client use the BasicHttpBinding class.

This procedure assumes that the calculator service is running. For information about building the service,
see How to: Specify a Service Binding in Configuration. It also uses the ServiceModel Metadata Utility
Tool (Svcutil.exe) Windows Communication Foundation (WCF) provides to automatically generate the
client components. The tool generates the client code for accessing the service.

The client is built in two parts. Svcutil.exe generates the ClientCalculator that implements the
ICalculator interface. This client application is then constructed by constructing an instance of
ClientCalculator and then specifying the binding and the address for the service in code.

For the source copy of this example, see the Basic Binding sample.

To specify a custom binding in code


1. Use Svcutil.exe from the command line to generate code from service metadata.

Svcutil.exe <service's Metadata Exchange (MEX) address or HTTP GET address>

2. The client that is generated contains the ICalculator interface that defines the service contract
that the client implementation must satisfy.

[ServiceContract]
public interface ICalculator
{
[OperationContract]
double Add(double n1, double n2);
[OperationContract]
double Subtract(double n1, double n2);
[OperationContract]
double Multiply(double n1, double n2);
[OperationContract]
double Divide(double n1, double n2);
}
3. The generated client also contains the implementation of the ClientCalculator.

Page 15 of 19
public class CalculatorClient :
System.ServiceModel.ClientBase<Microsoft.ServiceModel.Samples.ICalculator>,
Microsoft.ServiceModel.Samples.ICalculator
{

public CalculatorClient()
{
}

public CalculatorClient(string endpointConfigurationName) :


base(endpointConfigurationName)
{
}

public CalculatorClient(string endpointConfigurationName, string remoteAddress) :


base(endpointConfigurationName, remoteAddress)
{
}

public CalculatorClient(string endpointConfigurationName, EndpointAddress


remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}

public CalculatorClient(Binding binding, EndpointAddress remoteAddress) :


base(binding, remoteAddress)
{
}

public double Add(double n1, double n2)


{
return base.Channel.Add(n1, n2);
}

public double Subtract(double n1, double n2)


{
return base.Channel.Subtract(n1, n2);
}

public double Multiply(double n1, double n2)


{
return base.Channel.Multiply(n1, n2);
}

public double Divide(double n1, double n2)


{
return base.Channel.Divide(n1, n2);
}
}
Create an instance of the ClientCalculator that uses the BasicHttpBinding class in a client
application, and then call the service operations at the specified address.

Page 16 of 19
//Client implementation code.
class Client
{
static void Main()
{
//Specify the binding to be used for the client.
BasicHttpBinding binding = new BasicHttpBinding();

//Specify the address to be used for the client.


EndpointAddress address =
new EndpointAddress("http://localhost/servicemodelsamples/service.svc");

// Create a client that is configured with this address and binding.


CalculatorClient client = new CalculatorClient(binding, address);

// Call the Add service operation.


double value1 = 100.00D;
double value2 = 15.99D;
double result = client.Add(value1, value2);
Console.WriteLine("Add({0},{1}) = {2}", value1, value2, result);

// Call the Subtract service operation.


value1 = 145.00D;
value2 = 76.54D;
result = client.Subtract(value1, value2);
Console.WriteLine("Subtract({0},{1}) = {2}", value1, value2, result);

// Call the Multiply service operation.


value1 = 9.00D;
value2 = 81.25D;
result = client.Multiply(value1, value2);
Console.WriteLine("Multiply({0},{1}) = {2}", value1, value2, result);

// Call the Divide service operation.


value1 = 22.00D;
value2 = 7.00D;
result = client.Divide(value1, value2);
Console.WriteLine("Divide({0},{1}) = {2}", value1, value2, result);

//Closing the client gracefully closes the connection and cleans up resources
client.Close();

Console.WriteLine();
Console.WriteLine("Press <ENTER> to terminate client.");
Console.ReadLine();
}
}
}
5.Compile and run the client.

Page 17 of 19
Binding configuration summary
Following table shows parameters such as security, transport protocol, encoding and hosting environment
choices available with different binding for a WCF service. This summary should help choose an
appropriate binding for your project environment.

FAQ about an Endpoint

Binding Transport Protocol Encoding Host


Security Default Other
Default Configurable

basicHttpBinding HTTP Text/XML, MTOM IIS, WAS


None,
Transport, Message, Mixed

wsHttpBinding Message, Transport, Mixed HTTP Text/XML, MTOM IIS, WAS


netTcpBinding Transport, Message, Mixed TCP Binary WAS
netNamedPipeBinding Transport,None Named Pipe Binary WAS
netMsmqBinding Message, Transport, None TCP Binary WAS
netPeerTcpBinding Transport P2P Binary -
Can I have multiple endpoints for a WCF service?
Answer: Yes

Can I have multiple endpoints of the same binding type e.g. multiple endpoints of basicHttpBinding?
Answer: Yes

Can I have multiple endpoints of different binding types to serve different types of clients e.g. an endpoint
with basicHttpBinding, an endpoint with wsHttpBinding and an endpoint with netTcpBinging?
Answer: Yes

Summary
As you have seen, Windows Communication Foundation provides a framework to configure the transport,
security and encoding needs to cater various communication requirements. The WCF framework keeps
the development API same irrespective of the way it is going to be consumed by the clients & the
endpoint is provided to meet the communication requirements, and you can have one or many of them to
cater to different clients and communication requirements. This eliminates the need to learn and
implement diverse set of communication models to support HTTP or TCP communication infrastructures.

References:
http://www.c-sharpcorner.com/UploadFile/pjthesedays/bindwcf05032009012251AM/bindwcf.aspx

Page 18 of 19
http://msdn.microsoft.com/en-us/library/ms731092.aspx

Page 19 of 19

You might also like