WCF Endpoints

Introduction

WCF endpoints contain the details of the WCF service, like where the service resides (address), how to access it and what the WCF service exposes to the client. Every service must have an address defining the service's residence, a binding that defines how a client to communicates with the service and a contract that defines what the service does. The combination of Address, Contract and Binding is called an endpoint. The elements of an endpoint are called A, B and C as in the following.

Elements of an Endpoint

  1. Address
  2. Binding
  3. Contracts 

Address

The address defines where the service resides, it's how the client determines where a service is located. Every service has a unique address, the address format of WCF is as in the following:

    [Transport] ://[Domain Name]:[Port]//[Service Name]

Example

    HTTP Address

    http://localhost:80//Myservice.cs

    TCP address

    Net.tcp//localhost:80//MyService.cs

Bindings

WCF has a couple of built-in bindings that are designed to fulfill some specific needs. You can also define your own custom bindings in WCF to fulfill your needs. All built-in bindings are defined in the System.ServiceModel Namespace. Here is the list of 10 built-in bindings in WCF that we commonly use. More Details.

Contracts

The WCF contract defines what a service does or what action a client can perform in a service. The contract is one of the elements of WCF endpoints that contain information about the WCF service. The contract also helps to serialize service information. These are the types of contracts, Service Contract, Data Contract, Fault Contract and Message Contract. View Contracts.
 
Summary

I hope you have learned about the endpoins of WCF service.