WCF Interview Questions and Answers Part 2

1.) What is message Contract in WCF ?                                                                                   
A Message contract provides control over the simple object access protocol (SOAP).Message that are produced and consumed by WCF. It helps to direct access to the SOAP header and bodies to change the SOAP Message as for your requirement.The most important feature  of SOAP Message is interoperability.
2.) What is Service Contract in WCF ?                                                                                     
A service contract is a contract that defines the operations or methods available at end points .It also defines the message exchange pattern such as behavior of the message in one way,duplex or request/reply.     
3.) What is Policy binding in WCF ?                                                                                        
The Policy and Binding component of the contract layer specifies important information.Such as security and protocol of a WCF services. Binding is a process used to enable communication between services and clients.There are some protocols which are very necessary to communications with the end point of services.Ex HTTP,TCP,MSMQ. 
4.) What is Service RunTime Layer in WCF ?                                                                     The service runtime layer specifies and manage different behavior of a service that occur during its operation such as consuming  or hosting the services.   
5.) What are the behavior managed by Service RunTime Layer in WCF ?                
  1. Throttling behavior:- The number of processed messages varies according to demand of services.
  2. Error Behavior:- It specifies the action to be taken, it only of the message give error during service runtime.
  3. Instance behavior:-  It specifies the number of service instance that are available to process a message.
  4. Meta Data Behavior:- It specifies ,meta data is available or not across the network.
  5. Message Inspection:- It inspects all the message during service runtime.
  6. Transaction behavior:- It roll backs the transactions, if any process fails during service runtime. 
  7. Dispatch Behavior:- It determines ,how a message is handled and processed by the WCF infrastructure.
  8. Concurrency behavior:- It specifies whether the message are processed sequentially or concurrently by the service.
  9. Parameter filtering:- It filters the message header and executes preset actions.
6.) What is MEPs in WCF ?                                                                                                          
MEPs stands for Message Exchange Patterns. There are three types of Message Exchange Patterns as given below:-
  • Request and Response
  • Data Gram
  • Duplex (half and full)
7.) What is SOAP in WCF ?                                                                                                          
SOAP stands for Simple Object Access Protocol. A Message contract provides control over the simple object access protocol (SOAP).The most important feature  of SOAP Message is interoperability.
8.) What is the Message Layer in WCF ?                                                                                
The message layer specifies the pattern of exchanging data between channels that are used during service communication.
There are two types of channels used in WCF.

  • Transport layer:- HTTP,Named pipes,TCP and MSMQ are used in transport layer.
  • Protocol :- WS-Security and WS-Reliability are protocols that used in WCF Applications.
9.) What are the protocols used in Message Layer in WCF ?                                         
There are some functionality of protocols which are used in messaging layer in WCF.

  1. Ws-Security Channel:- It enables .to secure the message by implementing the ws-security specification in the messaging layer of a service.
  2. Ws-Reliable Messaging Channel:- This protocols gives guarantee to deliver the message over channels.
  3. Encodes:- It provides the number of encodes for message.
  4. HTTP Channel:- It specifies that HTTP is used for delivering a message.
  5. TCP Channel:- It specifies that TCP is used for delivering the message.
  6. Transaction flow Channel:- It define the pattern in which a message is transacted.
  7. Named Pipe Channel:- It enables inter-process communication (IPC).
  8. MSMQ Channel:- It enables services to inter-operate the MSMQ Applications.
10.) What is Activation and Hosting Layer in WCF ?                                                        
The activation and hosting layer renders various options for the services in which they can be activated as well as hosted. we can host asp.net application services in two ways.
  • Self hosting (ex. window application,window service,console application.)
  • External server hosting (ex. IIS ,WAS)
11.) What are the options provided by Activation and Hosting Layer in WCF ?    
The activation and hosting option provide by following layers.
  • Window Activation Service (WAS):-It enables WCF Application automatically activate when deployed on a computer that is running WAS.
  • Window Services:- It enables you to run WCF Service as windows services.
  • .EXE:- It enables you to run the WCF Services as executable files(.exe).
  • COM+:- It enables to run WCF Services as a COM+ application.
12.) What are the features of  WCF  in .NET ?                                                                    
There are some features of WCF in .NET.
  • End point support
  • Enhanced transport layer
  • Queuing support
  • Improved security
  • Improved transaction process
  • Support for hosting WCF Service on various servers.
  • Ajax integration and java script object notation(JSON Support)
Learn More .NET Interview Questions and Answers


Post a Comment

Powered by Blogger.