WCF Interview Questions part 1

Q. What is WCF?
A. WCF stands for Windows Communication Foundation. It is a Software development kit for developing services on Windows. WCF is introduced in .NET 3.0. in the System.ServiceModel namespace. WCF is based on basic concepts of Service oriented architecture (SOA)

Q. What is endpoint in WCF service?
A. The endpoint is an Interface which defines how a client will communicate with the service. It consists of three main points: Address,Binding and Contract.(Also knows as ABC of WCF)

Q. Explain Address,Binding and contract for a WCF Service?
A.
Address:Address defines where the service resides.
Binding:Binding defines how to communicate with the service.
Contract:Contract defines what can be done with the service.

Q. What are the types of binding available in WCF?
A. A binding is identified by the transport it supports and the encoding it uses. Transport may be HTTP,TCP etc and encoding may be text,binary etc. The popular types of binding may be as below:
a)BasicHttpBinding
b)NetTcpBinding
c)WSHttpBinding
d)NetMsmqBinding

Q. What are the types of contract available in WCF?
A.
a)Service Contract:Describes what operations the client can perform.
b)Operation Contract : Defines the method inside Interface of Service.
c)Data Contract:Defines what data types are passed
d)Message Contract:Defines wheather a service can interact directly with messages


Q. What is the proxy for WCF Service?
A. A proxy is a class by which a service client can Interact with the service by calling different methods.We can create proxy by using svcutil.exe

Q. What is the basic difference between WCF Service and Web Service?
A. WCF service support both http and tcp protocol while web service support only http protocol.

No comments:

Post a Comment