WCF Interview Questions.


What is WCF (Windows communication foundation?

WCF is a framework for building service oriented application using WCF

.By using WCF we can send asynchronous message from one service end point to another service end point

. It is connected service oriented application

. WCF provides a runtime environment for service

. It allows you to build advanced user interface that incorporate document like 2D and 3D animations.

 

Difference between WCF and Web services?

  1. It can accessed only over HTTP
  2. It work in stateless environment
  3. WCF is flexible because it service can be hosted in different types of application.
  4. To host the WCF service following :

IIS , WAS , Self-Hosting

Managed Winsdows services

IIS : Hosting the application in application domain or process provided by IIS server

WAS (Windows activation service)

Hosting the application in application domain and provided by WAS

Self-Hosting  Hosting an application in his own Application domain.

Web services can only be invoked by HTTP while WCF service component can be invoke by any protocol and any transport type where WCF are flexible.

What are 3 major points in WCF ?

We should remember ABC

. Address

. Binding

. Contract

Address :Specifies the location of the service to communicate with service to communicate with other service.

Binding : specifiers how 2 pairs with communicate in terms of transport and encoding and protocols.

Contracts : Specifies the interface between client and server .4

 

What was the code name for WCF

The code name of WCF is “INDIGO” .

WCF is a unification of .Net framework communication technology , which untitles the following technologies.

Net remoting

MSMQ

Web services

COM +

Major and Main Components in WCF

.Service Class

.Hosting Environment

.End point

End Point : Service must have address and that address defines where the service resides,

Contract that defines what the service does and binding the defines how to communicate with the service.

The relationship between address, contract and binding is called End Point.

 

Types of Binding in WCF ?

There are 9 Types of binding in WCF

  1. Basic Binding
  2. TCP Binding
  3. Peer network Binding
  4. IPC Binding
  5. Web service Binding
  6. Federated Binding
  7. Duplex WS Binding
  8. MSMQ Binding
  9. MSMQ Integration Binding

Basic Binding :  It offered by basic HTTP Binding .BB Expose a WCF service as a legacy ASMX web service.So that old client can work with new service.

TCP Binding : It offered by Net TCP Binding

Cross-Machine communication on the intranet.It supports including reliability transactions, security.

Peer Network Binding : It offered by Net peer TCP Binding .

This peer network enabled client and service subscribe to the same grid and broad cast message to it.

IPC Binding: It offered by Net Named PIPE Binding.

Sample address for above transport .

HTTP : htpp://localhost:81

TCp : net.tcp://localhost:82/My_service

Peer Network : net.pipe://localhost:My_service.

MS MQ : net.msmq://localhost/Private/Mymsmq_service.

Advertisements

Thanks a lot for visiting this site .. Please leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s