Q1. Explain how does WCF works?
WCF
follows the “Software as a Service” model, where all units of functionality are
defined as services. For communication, each point is a portal or
connection either with the client or other services. It is a program that
exposes a collection of endpoints.
Q2. Explain what is the difference between
ASMX web services and WCF?
The
difference between WCF and ASMX or ASP.net web service is that ASMX is designed
to send and receive messages using SOAP over HTTP only. While the WCF can
exchange messages using any format over any transport protocol
Q3. Mention what is the endpoint in WCF and what are
the three major points in WCF?
Every
service must have an address that determines where the service is
located, contract that defines what the service does and binding that
tells how to communicate with the service.
Address:
It specifies the location of the service which will be like http://Myserver/Myservice.
To communicate with our service client it will use this location
Contract:
It specifies the interface between the server and client. It’s a simple
interface with some attribute
Binding:
It decides how two parties will communicate with each other in terms of
transport and encoding and protocols
Q4 Mention the address syntax and the different
formats of WCF transport scheme?
Address
syntax of WCF transport scheme is
[transport]://
[machine or domain] [: optional port] format
Q5. In WCF what are duplex contracts?
Duplex
messaging or call-back is used in WCF to communicate with the client. Over
different transport system Duplex messaging in WCF is done like TCP, Named pipe
and even HTTP. Collectively this is known as duplex contracts in WCF.
Q6. Mention what are the different
instance modes in WCF?
To a
particular service instance WCF binds an incoming message request, so the
available modes are
·
Per Call: This instance is created for each call,
efficient in terms of memory but need to maintain session
·
Per Session: For a complete session of a user
instance are created
·
Single: One instance is created which is shared
among all the users and shared among all. In terms of memory it is least
efficient.
Q7. List out the types of binding available in
WCF?
The
types of binding available in WCF are
BasicHttpBinding
NetTcpBinding
WSHttpBinding
NetMsmqBinding
Q8.Explain what is Data Contract Serializer?
The
process of changing an object instance to a portable and transferable format is
known as the Serialization, and serialization of data is referred as Data Contract
Serializer.
Q9. Mention what are the various address format in
WCF?
The
various address format in WCF are
·
HTTP Address Format: à http:// local host:
·
TCP Address Format:à net.tcp://local host:
·
MSMQ Address Format:ànet.msmq://localhost:
Q10. What is REST and what is the problem with WCF
REST and how it can be resolved?
REST
stands for Representational State Transfer, for designing network application
REST is used. It relies on a stateless, client server, cacheable communications
protocol. The reason behind creating WCF is to support SOA and not REST.
It requires a lot of configuration in order to create HTTP REST service using
WCF. To overcome this tedious task, ASP.NET web API was introduced.
0 Comments