Have Queries? Talk to our Career Counselor for more Guidance on picking the right career for you!
WCF stands for Windows Communication Foundation (WCF) and is a part of .NET Framework 3.0 which is considered as the Microsoft Service-Oriented Architecture (SOA) platform for building distributed and interoperable applications. WCF unifies ASMX, Remoting, and Enterprise Services stacks and provides a single programming model. WCF services are interoperable and support all the core Web services standards.
WCF provides a set of pre-defined endpoints known as Standard Endpoints for metadata exchange, discovery and web. You can configure the standard endpoints by using a config file and programmatically. Here is the list of standard endpoints :
So, the Address (A), Binding (B), and Contract (C) are called the ABC of the service endpoint. To reach an endpoint, the Address (Where), the Binding (How) and the Contract (What) are really important for establishing communication.
When a request has made to service, it creates a new instance of service for each method call and this will be disposed of once the response goes to the client. This whole process is known as per call instance mode.
You need at least a managed process, a ServiceHost instance and an Endpoint configured for hosting a WCF service.
Following are the possible approaches for hosting a service:
You can generate proxy by using the following steps:
Using Visual Studio
WCF supports the following transport schemas:
WCF Data Services uses OData (Open Data Protocol) protocol for querying or manipulating the data. WCF Data Services is built on top of WCF REST Services. It is a RESTful service to support CRUD operations on the database using the HTTP protocol. It supports all database operations using URI. DATA protocol can expose data from the relational database, File systems, Web sites, services etc. It supports XML or JSON format for exposing the data.
There are two ways to create a WCF Client or calling a WCF Service as:
There are four ways of hosting a WCF service.