InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Name the different ways to create a WCF client. |
|
Answer» There are two different ways to CALL a WCF service or CREATE a WCF CLIENT:
|
|
| 2. |
What do you mean by SOA? |
|
Answer» An SOA (Service-oriented ARCHITECTURE) is an architecture style that ENABLES different applications to be organized as SERVICES. In essence, it determines how communication is possible between TWO computing entities and how one entity performs functions on behalf of another entity. Rather than being a SPECIFIC technology or language, SOA is a way to design systems. The purpose of this architecture model is to enhance an enterprise's efficiency, agility, and productivity. |
|
| 3. |
Name three different types of transaction managers supported by WCF. |
|
Answer» Three different types of transaction managers SUPPORTED by WCF include: |
|
| 4. |
What do you mean by Security Implementation? |
|
Answer» Since, WCF's support various protocols, such as TCP, HTTP, and MSMQ, the user must ENSURE that the necessary steps are taken to safeguard messages, and also establish security policies for authenticating and authorizing CALLS. WCF provides an easy and rich CONFIGURATION environment for secure messaging. WCF supports the following security models:
|
|
| 5. |
Explain Tracing in WCF. |
|
Answer» Using WCF tracing, you can DIAGNOSE data, fault MESSAGES, and analyze them. Tracing offers better insight into the application's behavior and flows than debugging. It gives you a detailed account of all application components including faults, code exceptions, system events, and operation calls. By DEFAULT, WCF tracing is not ENABLED, therefore it must be enabled by configuring it with the SWITCH value and tracelistener. |
|
| 6. |
What do you mean by service proxy? |
|
Answer» WCF proxy classes enable client applications to communicate with services by sending and RECEIVING messages. Communication involves exchanging messages in the FORM of requests and responses. This will include details such as the Service Path, Protocol Details, ETC. |
|
| 7. |
Name the isolation levels that are provided in WCF |
|
Answer» WCF offers the following isolation or transaction levels:
|
|
| 8. |
What do you mean by WCF service endpoints? |
|
Answer» Endpoints generally provide WCF with instructions on how to construct communication channels at RUNTIME to send and receive messages. It provides the necessary configuration to set up the communication and to CREATE the complete WCF service application.
|
|
| 9. |
Explain Concurrency management. |
|
Answer» In WCF, concurrency issues can occur when multiple threads access the same resource simultaneously. One request can be handled at a time by the WCF service. With WCF concurrency management, you can control multiple threads within an InstanceContext at any given time USING System.ServiceModel.ServiceBehaviorAttribute. It also helps you to configure the number of service instances that can serve multiple concurrent requests.
|
|
| 10. |
Write different ways of hosting a WCF service. |
|
Answer» The FOLLOWING are the DIFFERENT methods of hosting WCF services:
|
|
| 11. |
What are the types of contracts in WCF? |
|
Answer» The WCF includes five types of contracts as follows:
Example: [ServiceContract]interface IMyContract{[OperationContract]string MyMethod();}class MyService : IMyContract{public string MyMethod(){return "Namaste";}
Example: [ServiceContract] interface ICustomer { [OperationContract] Response AddNew(string CUSTOMERNAME); Response Delete(int customerID); }
Example: [DataContract]class Person{ [DataMember] public string ID; [DataMember] public string Name;} [ServiceContract] interface IMyContract{ [OperationContract] Person GetPerson(int ID);}
Example: [ServiceContract] interface ICuboidService { [OperationContract] [FaultContract(typeof(CuboidFaultException))] CuboidDetailResponse CalculateDetails1(CuboidInfoRequest cInfo); [OperationContract] [FaultContract(typeof(CuboidFaultException))] CuboidDetail CalculateDetails2(CuboidInfo cInfo); [OperationContract] [FaultContract(typeof(CuboidFaultException))] CuboidDetail CalculateDetails3(int nID, CuboidDimension cInfo); }
Example: [ServiceContract]interface IMyContract{ [FaultContract(typeof(MyFaultContract1))] [FaultContract(typeof(MyFaultContract2))] [OperationContract] string MyMethod(); [OperationContract] string MyShow();} |
|
| 12. |
Explain the WCF Contract. |
|
Answer» Basically, WCF CONTRACTS are standardized, platform-neutral descriptions of what the service does. Contracts mainly serve to enable clients and services to agree on what sort of operations and STRUCTURES they will USE for communication. One of the components of a WCF ENDPOINT is the contract, which contains INFORMATION about the service. In addition, the contract helps serialize service information. |
|
| 13. |
Write the difference between WCF and Web Services |
||||||||||||||||
Answer»
|
|||||||||||||||||
| 14. |
Write the core components of WCF? |
|
Answer» The three core components of WCF are as follows:
|
|
| 15. |
Write some WCF features? |
|
Answer» WCF features include:
|
|
| 16. |
What are the benefits of WCF? |
|
Answer» WCF has the following benefits:
|
|
| 17. |
Why should one use WCF services? |
|
Answer» Here are some reasons to use WCF services:
|
|