WCF interview questions by questionsgems.
Looking for wcf interview questions? Here we provide you our best collection of wcf questions and answers for interview.
Here they are:
WCF Interview Questions
Question1: What is WCF?–Answer:WCF is a platform for building distributed businesses and deploying services among various endpoints in Windows. WCF was initially called “Indigo” and we can build service-oriented applications and provide interoperability.–WCF or Windows Communication Foundation is a programming model to create service oriented applications. It is used to create and deploy the service that is accessible to lots of different clients. It provides an environment where you can create a service which can be accessible to Windows clients as well as Linux clients or any others. It provides more features compared to web services.–WCF is a Microsoft technology to create service oriented application. Before the WCF, the Web Service was used to create services but that type of service is only accessible to Windows client hosted on HTTP protocol. But WCF services are accessible with different protocols like http, tcp, msmq, etc.
Question2: Mention what are the main components of WCF?–Answer:Main components of WCF are–Service: The working logicHost: The path where the data is saved. E.g., .exe, process, windows serviceEndpoints: The way the service is exposed to the outside world
Question3: Explain how does WCF works?–Answer:WCF follows the “Software as a Service” model, where all units of functionality are defined as services. For communication, each point is a portal or connection either with the client or other services. It is a program that exposes a collection of endpoints.
Question4: Explain what is the difference between ASMX web services and WCF?–Answer:The difference between WCF and ASMX or asp.net web service is that ASMX is designed to send and receive messages using SOAP over HTTP only. While the WCF can exchange messages using any format over any transport protocol
Question5: Mention what is the endpoint in WCF and what are the three major points in WCF?–Answer:Every service must have an address that determines where the service is located, contract that defines what the service does and binding that tells how to communicate with the service.
Question6: Explain how many types of contract does WCF defines?–Answer:WCF defines four types of Contracts–Service ContractsData ContractsFault ContractsMessage Contracts
Question7: Mention what are the ways of hosting a WCF service?–Answer:The ways of hosting a WCF service are–IISSelf-HostingWAS (Windows Activation Service)
Question8: the address syntax and the different formats of WCF transport scheme?–Answer:Address syntax of WCF transport scheme is–[transport]:// [machine or domain] [: optional port] format
Question9: In WCF what are duplex contracts?–Answer:Duplex messaging or call-back is used in WCF to communicate with the client. Over different transport system Duplex messaging in WCF is done like TCP, Named pipe and even HTTP. Collectively this is known as duplex contracts in WCF.
Question10: what are the different instance modes in WCF?–Answer:To a particular service instance WCF binds an incoming message request, so the available modes are–Per Call: This instance is created for each call, efficient in terms of memory but need to maintain sessionPer Session: For a complete session of a user instance are createdSingle: One instance is created which is shared among all the users and shared among all. In terms of memory it is least efficient.
WCF Interview Questions And Answers For Experienced
Question1: Explain what is a Service Proxy in windows Communication Foundation?–Answer:In WCF, a service proxy enables applications to interact with WCF service by sending and receiving messages. It’s a class that covers service details like service path, service implementation technology, platform and communication protocol and so on. So, when the application interact the service through proxy, it gives the impression that it’s communicating a local object.
Question2: what is SOA?–Answer:SOA (Service Oriented Architectural) is a collection of services that determines how two computing entities will communicate with each other to achieve certain business functionality and also how one entity can work on behalf of another entity.
Question3: What are the types of Data Contracts in WCF?–Answer:There are two types of Data Contracts–Data Contract: Attribute used to define the classData Member: Attribute used to define the properties
Question4: What are the three types of transaction manager WCF supports?–Answer:The types of the transaction manager that WCF supports are–Light WeightWS- Atomic TransactionOLE Transaction
Question5: Explain what are the MEPs available in WCF?–Answer:MEP stand for Message Exchange Pattern, three types of message exchanged patterns are allowed.–Data GramRequest and ResponseDuplex
Question6: Name the namespace that is used to access WCF service?–Answer:System.ServiceModel is used to access WCF service
Question7: out the types of binding available in WCF?–AnswerThe types of binding available in WCF are–BasicHttpBindingNetTcpBindingWSHttpBindingNetMsmqBinding
Question8: Explain what is DataContractSerializer?–Answer:The process of changing an object instance to a portable and transferable format is known as the Serialization, and serialization of data is referred as DataContractSerializer.
Question9: what are the various address format in WCF?–Answer:The various address format in WCF are–HTTP Address Format: à http:// local host:TCP Address Format:à net.tcp://localhost:MSMQ Address Format:ànet. Msmq://localhost
Question10: Is REST and what is the problem with WCF REST and how it can be resolved?–Answer:REST stands for Representational State Transfer, for designing network application REST is used. It relies on a stateless, client server, cacheable communications protocol. The reason behind creating WCF is to support SOA and not REST. It requires a lot of configuration in order to create HTTP REST service using WCF. To overcome this tedious task, asp. Net API was introduced.
Question11: List out what are the different isolation levels provided in WCF?–Answer:The different isolation levels provided in WCF are–Read UncommittedRead CommittedRepeatable ReadSerializable
Advanced WCF Interview Questions
1.Explain your understanding of the WCF technology.
2.Explain the WCF fundamentals and its architecture in brief.
3.What is the need for WCF services for your business?
4.What are the benefits or advantages of WCF Technology?
5.How will you distinguish the WCF from other web services?
6.What do you mean by SOA? Do web services come under SOA?
7.How will you define the service contract in WCF?
8.What do you mean by contract in WCF? Explain the type of contracts too?
9.How will you explain the data contract in WCF?
10.How will you define the message contract in WCF?
11.What are the endpoints in WCF? Explain its common types too?
12.What is the need of Address when defining service endpoints in WCF?
13.What is binding in WCF? Explain its characteristics too?
14.What are the transactions in WCF? Explain its types too?
15.What are the hosting requirements for a web service?
Conclusion:These are WCF questions for interview. I hope you guys like it and will definitely helpful for you. If you have any question or suggestion just comment below or contact us.Thanks