WCF Interview Questions Part 1 | URDINESH

Software Programming, Tutorials, Interview Preparations,Stock Market,BSE/NSE, General informations

Wednesday, May 14, 2014

WCF Interview Questions Part 1

1)      Explain different type of binding in WCF

  • WCF provides nine built-in bindings:
1.   BasicHttpBinding: Basic web service communication. Exposes WCF services as legacy ASMX web services. Used for interoperability. No security by default.
2.     WSHttpBinding: Web services with WS-* support. Supports transactions and reliable messaging.
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.

2)      Explain different type of contracts available in WCF

Contract is platform-neutral and standard way of describing what services does. In WCF, all services are exposed as contract. There are four types of contracts :

Service Contract – It describes operation provided by service. A service should contain at least one service contract. Service Contract is defined by using [ServiceContract] attribute, it is similar to [WebMethod] of Web Services.

Data Contract – It describes data exchange between service and client. Data Contract is defined using [DataContract] and [DataMember] attribute.

Message Contract – It transfers information from service to client. WCF uses SOAP message format for communication.

Fault Contract – It handles and convey error message to the client when service get error.


3)     We have a large amount of data with us, which should be passed as an input to WCF service. What type of binding will you use?

netTcpBindingbinnding


No comments:

Post a Comment

Thanks for your valuable comments

Followers