WCF Interview Questions and Answers
Question - 41 : - Which are the different isolation levels in WCF?
Answer - 41 : - Following is a list of different isolation levels in WCF:
o Read Uncommitted: Also known as dirty isolation level. It makes sure that corrupt Data cannot be read. This is the lowest isolation level.
o Read Committed: It ensures not to read the data that has been changed by any other application and is not yet committed. It is the default level.
o Repeatable Read: It stops the usage of dirt read and non-repeatable read. It states that data fetched through a query will be locked and will not be updated by any other transaction.
o Serializable: It does not allow any modification and addition of new data till the transaction is completed. This is considered to be a very restrictive level.
o Snapshot: It raises an error on modifying a data that has already been changed by any transaction.
Question - 42 : - Give the address format of all the bindings in WCF.
Answer - 42 : - A list of address formats and their respective bindings:
TCF Address Format - net.tcp://local host:portnumber
HTTP Address Format - http://local host:portnumber
MSMQ Address Format - net.msmq://local host:portnumber
Question - 43 : - Explain the WCF RIA?
Answer - 43 : - WCF RIA is the framework for developing the n-tier application for RIA (Rich Internet App). It is used in Rich Internet Apps like Silverlight, AJAX etc. WCF RIA is used to solve the major problems like Tight Coupling.
Question - 44 : - How would you generate a proxy for WCF?
Answer - 44 : - You can generate proxy by using the following steps:
Using Visual Studio
Using SvcUtil
Question - 45 : - What is binding?
Answer - 45 : - Binding is used to define how an endpoint communicates to the world. It defines the transport such as HTTP or TCP. It can contain binding elements that specify details like the security mechanisms used to secure message patterns used by an endpoint.
Question - 46 : - What are the different modes of communication in WCF?
Answer - 46 : - There are three modes of communication in WCF:
One-Way
In the One-Way operation mode, the client will send a request to the server and does not care whether it is success or failure of service execution. There is no return from the server side, it is one-way communication.
Request-Reply
When as client makes a request to the WCF service and client will wait to get a response from service (till receiveTimeout). After getting the response it will start executing the rest of the statement.
Callback
It is the service to call the client. In which, service will act as client and client will act as service.
Question - 47 : - What is the request-reply mode in WCF?
Answer - 47 : - When a client made a request to a service, it will wait until it gets the response back.
If the response is not received until the given time, it will show an error.
If the client gets the response then next instructions will be executed.
Question - 48 : - How many types of binding are there in WCF?
Answer - 48 : - WCF supports nine types of bindings:
1. Basic binding
2. TCP binding
3. Peer network binding
4. IPC binding
5. Web Services binding
6. Federated Web Service binding
7. Duplex WS binding
8. MSMQ binding
9. MSMQ integration binding
Question - 49 : - What are the transport schemas supported by WCF?
Answer - 49 : - WCF supports the following transport schemas:
o HTTP
o TCP
o PEER network
o IPC (Inter Process Communication)
o MSMQ
Question - 50 : - What are the ways of hosting a WCF service?
Answer - 50 : - The ways of hosting a WCF service are:
o IIS
o Self-Hosting
o WAS(Window Activation Service)