WCF Interview Questions and Answers Part 3

By // No comments:
1.) What are the ways to host and activate services of WCF ?                                        
The Activation and hosting layer renders various options for the services in which they can be activate as well as hosted. Services can be hosted in two ways,
  1. Self Hosted
  2. Hosted on external agents
Such as IIS(Internet Information Services) or WAS (Windows Activation Services).
2.) What are the options provided by Activation and Hosting layer in WCF ?        
The Hosting and activation options provided by this layer as follows.
  • Windows Activation Services(WAS):-It enables WCF application to automatically activate when deployed on a computer that is running WAS.
  • Windows Services:- It enables you to run WCF services as windows services.
  • .EXE :- It enables you to run WCF services as executable(.exe) files.
  • COM+ :-It enables you to run WCF services as a com+ Application.
3.) What is end point support in WCF ?                                                                                 
An end point is a resource on a Network through which message can be sent.The end points of the services in WCF are responsible for enabling communication between client and server.
4.) What are the various elements in end point support in WCF ?                              
The end point include various elements which are as follows:-
  • Address to locate the services where they are running.
  • Bindings to communicate with services.
  • Contracts to specify the tasks to be performed while communicating with services.
  • A set of behaviours that specify local implementation of details of the end point.
5.) What is the ABCs of  WCF ?                                                                                                   
The Addresses ,Bindings and contracts elements of the end points are known as ABCs of WCF. 
6.) What is Address in  WCF ?                                                                                                    
Every end point is linked with address that are used to find and Identify services.Suppose you want to send message to a service,you need to have its address.An address in WCF consists of Uniform Resource Locator (URL) that determines the protocols used by service,the host on which it is running and the path of the service.
7.) What are the Specifications of an Address in WCF ?                                                 
The specifications of an address are as follows:
  • Scheme:- It defines the transport layer protocol,such as HTTP and TCP of a service.
  • Machine :- It defines the full domain name of the host machine. 
  • Port :- It defines the port number where a WCF is running.It is a optional field in the address specification.The default port of the HTTP address is 8080.
  • Path :- It defines the path of the services.The name of the directories and sub directories in the path can be separated by a forward slash.
8.) What are the formats of an Address of a service in WCF ?                                     
The format of the address of a service is as follows:-
scheme://domain_name:Port/Path1/Path2/Path3
  • Scheme:-It refers to a protocol used to transfer services from servers to clients.
  • Domain_name:-It refers to the name of the server where the service is running.
  • Port:- It refers to the port number where the services is listening.
  • Path:- It contains the name of the directories and their sub directories.
9.) What is the meaning of Address URL http://localhost:8080/dir/sub-dir ?      
In this URL,
  • The http protocol is the scheme.
  • localhost is the domain name (local host is the default name of the local machine.If the service is running on the remote server,then the name can be www.myfirstservice.com ) .
  • 8080 is the port number where the services is listening.
  • /dir/sub-dir is the path of the services.
10.) What are the different type of addressing formats in WCF ?                               
There are different type of addressing formats as follows:
  • HTTP address
  • TCP address
  • MSMQ address
  • IIS address
  • Base address
  • Named pipe address 
Learn More .NET Interview Questions and Answers
3

WCF Interview Questions and Answers Part 5

By // No comments:
1.) What are the main transport layer protocols used in wcf ?                                   
  • HTTP
  • HTTPs
  • TCP
  • Named pipes
2.) What is one main difference between HTTP and TCP protocol in wcf ?           
HTTP is connectionless protocol while TCP is connection -based protocol.
3.) What is the task of  TCP protocol in wcf ?                                                                      
  • TCP notifying the sender about packet delivery.
  • TCP Guaranteeing that order in which the packets are delivered is the same as they are sent.
  • It ensuring the non -duplication of packets.
  • It retransmitting lost or undelivered packets.
4.) Where can you use named pipes protocol in wcf  Application?                              
Named pipes protocol is used when communication is required between wcf applications on the same machine and you do not want to communicate with another machine.
3

WCF Interview Questions and Answers Part 2

By // No comments:
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.   
3

WCF Interview Questions and Answers Part 4

By // No comments:
1.) What is HTTP Addressing Formats in WCF ?                                                                
  The Services using HTTP can either be self -hosted or hosted on IIS.
  • The following format is used is used while addressing the self hosted HTTP Service :-
http://localhost:8080/services/MyfirstServices  
  • If the HTTP services is hosted on IIS ,the Secure Socket Layer(SSL) Protocol is required,for which you need to replace the http service with the https service. in wcf configuration, You can define the HTTP Address as following:- 
<endpoint
address="http://localhost:8080/services/MyfirstServices"
bindingSectionName="HTTPBinding"
contracts ="IExchange" />                                            
2.) What is TCP Addressing Formats in WCF ?                                                                 
The TCP address uses the same addressing rules as used by the HTTP address,excluding the scheme.The format of tcp address is as follows:-  
  net.tcp://localhost:8080/services/MyfirstServices                                           
In wcf configuration, You can define the tcp Address as following:- 
<endpoint
adddress="net.tcp://localhost:8080/services/MyfirstServices"
bindingSectionName="TCPBinding"
contracts ="IExchange" />
3

WCF Interview Questions and Answers Part 1

By // No comments:
1.) What is WCF  in .NET ?                                                                                                            
  • WCF is known as windows Communication Foundation.
  • WCF is a set of .NET Technologies that is used for creation and consumption of data services in a website.
  • It helps the developers to build secure and reliable websites.
  • It provides a common runtime environment for the services.
2.) What are the advantages of WCF services in .NET ?                                                   
There are some advantages of WCF services.
  • It Provides common platform for building service oriented application .
  • It helps the developers to build secure and reliable websites
  • It provides a common runtime environment for the services.
  • It provides Interchangeability between services.
3.) Why does we use WCF services ?                                                                                    
  • It Provides common platform for building service oriented application .
  • It is very simple to build an application.
  • It provides good communication facilities between client and server.
3
Powered by Blogger.