• +91 9723535972
  • info@interviewmaterial.com

WCF Interview Questions and Answers

Related Subjects

WCF Interview Questions and Answers

Question - 61 : - What is Callback mode in WCF? Explain.

Answer - 61 : - Ans: The WCF callback mode is a special type of mode where WCF on the call back calls the method of client and in this scenario WCF service acts as a client and client acts as a service. This mode is not supported by "HTTPBinding" so "WSDualHttpBinding" is used in this mode.

Question - 62 : - What are the different types of transaction managers supported by WCF?

Answer - 62 : - These are three types of transaction managers supported by WCF: 1. Light Weight 2. WS-Atomic Transaction 3. OLE Transaction

Question - 63 : - What are the MEP in WCF?

Answer - 63 : - MEP stands for Message Exchange Pattern. There are three types of Message Exchange Patterns are allowed: 1. DataGram 2. Request and Response 3. Duplex

Question - 64 : - What is Throttling in WCF?

Answer - 64 : - In WCF, "Throttling" is used to limit the sessions or instances to be created at an application level. It is used to boost the performance.

Question - 65 : - What is the usage of "maxConcurrentCalls" in Throttling?

Answer - 65 : - The "maxConcurrentCalls" attribute in throttling is used to limit the total number of calls which are going to the service instances. Its default value is 16.

Question - 66 : - What is "Know Types" in WCF?

Answer - 66 : - The KnowType is an attribute which is used to the parent class because if you define the complex class as the property of class then it would be very difficult for the compiler during the de-serialization process.

Question - 67 : - How will you define the service contract in WCF?

Answer - 67 : -

The Service Contract is a collective mechanism where the capabilities and requirements of service are specified for its consumers. It will explain the list of operations that will be performed by the service when it is executed. It will define the data types, protocols, and operation locations for the service. Defining a service contract for WCF is not easy but developers should have the right skills and experience to complete this task.

Question - 68 : - What do you mean by contract in WCF? Explain the type of contracts too.

Answer - 68 : -

The main objective of defining contracts is to make agree with both client and server for the same operations, structures, data types, etc. This is important to establish secure communication between the two. This is a formal agreement to define the platform neutrality and standards as well as what is done by the services. Here is given most common types of contracts that are frequently used within WCF technology.

  • Service Contract
  • Operation Contract
  • Data Contract
  • Message Contract
  • Fault Contract

Question - 69 : - How will you explain the data contract in WCF?

Answer - 69 : - A data contract is a formal agreement between the server and the client between whom data is exchanged securely. It could be defined either implicitly or explicitly based on the requirement. It will define the format, structure, and type of data to be exchanged between parties. It will define the process of how can data be serialized or deserialized. This is a versioning system that helps to manage changes for structural data. [code] [DataContract] Public class cuboidInfo { } [/code] Here, in the example, we have given the general syntax for the data contract. It will provide complete data abstraction at a new level like never before.

Question - 70 : - How will you define the message contract in WCF?

Answer - 70 : - The objective of the message contract in WCF is to define the structure for the message and how can you perform the serialization. By default, it will take care of SOAP messages based on service requirements. Here is given the general syntax for message contract in compact form –   [code] [MessageContract] Public Class AutherRequest { Public String AutherId; } [/code]

NCERT Solutions


Share your email for latest updates


Our partners