Windows Communication Foundation (WCF) - Interview Questions & Answers
1. What is Webservice ?
Web services (sometimes called application services) are services (usually including some combination of programming and data, but possibly including human resources as well) that are made available from a business's Web server for Web users or other Web-connected programs.
2. What is WCF ?
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data.
3. What are WCF Service Endpoints?
WCF Service is a program that exposes a collection of Endpoints. Each Endpoint is a portal for communicating with the world. All the WCF communications are take place through end point. End point consists of three components.

A WCF service endpoint has three basic elements i.e. Address, Binding and Contract.

Address: It defines "WHERE". Address is the URL that identifies the location of the service.
Binding: It defines "HOW". Binding defines how the service can be accessed.

1.BasicHttpBinding: Basic Web service communication. No security by default.
2.WSHttpBinding: Web services with WS-* support. Supports transactions.
3.WSDualHttpBinding: Web services with duplex contract and transaction support.
4.WSFederationHttpBinding: Web services with federated security. Supports transactions.
5.MsmqIntegrationBinding: Communication directly with MSMQ applications. Supports transactions.
6.NetMsmqBinding: Communication between WCF applications by using queuing. Supports transactions.
7.NetNamedPipeBinding: Communication between WCF applications on same computer. Supports duplex contracts and transactions.
8.NetPeerTcpBinding: Communication between computers across peer-to-peer services. Supports duplex contracts.
9.NetTcpBinding: Communication between WCF applications across computers. Supports duplex contracts and transactions.

Contract: It defines "WHAT". Contract identifies what is exposed by the service.
Questions & Answers
Dot Net Programming