WCF Interview Questions and Answers

    1 Votes

WCF Interview questions and answers for freshers and 2-3 year experienced C# .Net Programmers with examples

1) What is WCF ?

Microsoft has introduced WCF for inter process communication. WCF let us to establish communication channels using MSMQ, Remoting etc.
2) Explain the components used in WCF?
Below are the essential components of WCF –
  • Service class
  • End point
  • Hosting Environment
3) How WCF works?

WCF will follow – “Software and Service Model” , in which all essential components are defined as services and this will be used by client program.

4) Explain the difference between classic web services (ASMX) and WCF?

Classic webservice known as ASMX were using SOAP protocol for sending and receiving the messages over network and over HTTP protocol whereas WCF allows the communication to happen over any transport protocol.

5) What is Endpoint in WCF?

Endpoint will have following properties –

  • Address
  • Binding
  • Contract

6) Explain “Address” property of endpoint in WCF?

Address” property is the part of endpoint defined in service level and this property is used to determine the location if the service, where it is located.

7) Explain “Binding” property of endpoint in WCF?

Binding” property is the part of endpoint defined in service level and this property is used to decide out the type protocols, encoding's and transport. These all factors has been decided by both the parties who want to communicate each other.

8) Explain “Contract” property of endpoint in WCF?

It is just an interface between client and server where client and server communicate each other. Contracts are used to identify operations available.

9) Explain the types of contracts available in WCF?

Below are the list types of contracts available in WCF 

  • Data Contracts
  • Service Contracts
  • Message Contracts
  • Fault Contracts

10) Explain “Service Contracts” in WCF?

Service Contracts attribute given at the service level for WCF service and it will give you the list of operations that can be performed from that service. Service Contracts can be defined like –

[ServiceContract]

11) Mention the list of bindings supported by WCF?

Below are the list of schemas supported by WCF –

  • TCP
  • HTTP
  • MSMQ
  • IPC
  • Peer Network

12) Explain the ways to host the WCF Service?

Below are ways to host WCF Service –

  • IIS
  • Self Hosting
  • WAS

13) What is the Address format in WCF?

Below is the syntax of address –

[transport]://[machine or domain][optional port number]

14) What are duplex contracts in WCF?

Duplex contracts mainly uses duplex messaging which is used for callback to the client. Duplex messaging uses transport systems like – HTTP, TCP or Named Pipe.

15) What are different instance modes in WCF?

Below are the list of instance modes in WCF –

  • Per Call
  • Singleton
  • Per Session
Page 1 of 4

Popular Videos

How to speak to people

How to speak so that people want to listen.

Got a tip or Question?
Let us know

Related Articles

C# Interview Questions
.Net Framework Interview Questions and Answers
ADO.Net Interview Questions and Answers for Freshers, Experienced
ASP.Net Interview Questions and Answers
ASP.Net MVC Interview questions and Answers
ASP.Net Web API Interview Questions