WCF interview questions for experienced/WCF Interview Questions and Answers for Freshers & Experienced

What is used to create an n-tire application?

Ria services, It is for standard versions and action to create a difficult business application in Silverlight, AJAX by the validation from the client-side. It is also the perfect solution to ASP.NET and Silverlight by connecting them.

Posted Date:- 2021-09-20 09:49:46

What is needed to hold an error/exception?

A Fault Contract, is used to manage the client to try and catch blocks. SQL Server does not respond when the customer calls the service class. FaultExpection class is supported by SOAP Faults.

Posted Date:- 2021-09-20 09:48:05

Explain KnownType Attribute?

We can define in advance the type of consideration at the time of deserialization. The endpoints of client and service share the data contract for transfer at the time of returning values and parameters.

Posted Date:- 2021-09-20 09:47:15

What is the set of techniques in WFC?

Instant management is the set of techniques that tie up the customer’s appeal for immediate services, It is a way for deciding, when and which services instance will serve a client.

Posted Date:- 2021-09-20 09:46:34

What is used to design the application of the network? Define

Representational State Transfer, It is a way to give standards to protocols on the online for PC conversation. It is used to define resources, changing the information, scalability, data items.

Posted Date:- 2021-09-20 09:45:42

Define WCF? How does it work?

WCF is a program for generating the services application. To make the interaction convenient from MS messaging, remoting, Queuing, services, .NET and j2EE. It is very easy to use on protocols such as HTTP, TCP, msmq. Conveying the data from one to other customers.

Posted Date:- 2021-09-20 09:45:09

State the contract that is used to rectify errors in WCF

The contract that is used to correct mistakes is known is Fault Contract.

Posted Date:- 2021-09-20 09:44:37

In WCF what are the various isolation levels which are given?

The various isolation levels in WCF are as follows… Read Uncommitted, Read Committed, Repeatable Read and Serializable.

Posted Date:- 2021-09-20 09:44:04

What is the full form of REST?

The full form of REST is Representational State Transfer.

Posted Date:- 2021-09-20 09:43:26

State the types of binding that WCF encompasses.

The different types of binding which are there in WCF are as follows… BasicHttpBinding, NetMsmqBinding, NetTcpBinding and WSHttpBinding.

Posted Date:- 2021-09-20 09:42:54

Which is the namespace used to access WCF?

The namespace that is used to access WCF is known as System.ServiceModel.

Posted Date:- 2021-09-20 09:41:48

Mention the three types of transaction managers that WCF contains.

The three types of transaction managers that WCF has are as follows…Light Weight, WS-Atomic Transaction and OLE Transaction.

Posted Date:- 2021-09-20 09:40:57

What is Streaming in WCF?

In WCF any receiving message is delivered only once entire message has been received. What I mean here is that first message is buffered at the receiving side and once it is fully received it gets delivered to the receiving end. Main problem with this approach is that receiver end is unresponsive while message is getting buffered. So default way of message handling in WCF is ok for small size messages but for the large size messages this approach is not good. So to overcome this problem Streaming in WCF come into action.

Posted Date:- 2021-09-20 09:38:34

What is "Know Types" in WCF?

The KnowType is an attribute which is used to the parent class because if you define the complex class as the property of class then it would be very difficult for the compiler during the de-serialization process.

Posted Date:- 2021-09-20 09:37:32

What is the usage of "maxConcurrentCalls" in Throttling?

The "maxConcurrentCalls" attribute in throttling is used to limit the total number of calls which are going to the service instances. Its default value is 16.

Posted Date:- 2021-09-20 09:36:52

What is Throttling in WCF?

In WCF, "Throttling" is used to limit the sessions or instances to be created at an application level. It is used to boost the performance.

Posted Date:- 2021-09-20 09:36:15

What are the different types of transaction managers supported by WCF?

These are three types of transaction managers supported by WCF:

1. Light Weight

2. WS-Atomic Transaction

3. OLE Transaction

Posted Date:- 2021-09-20 09:35:39

What is Callback mode in WCF? Explain.

The WCF callback mode is a special type of mode where WCF on the call back calls the method of client and in this scenario WCF service acts as a client and client acts as a service.

This mode is not supported by "HTTPBinding" so "WSDualHttpBinding" is used in this mode.

Posted Date:- 2021-09-20 09:34:53

What is the one-way mode in WCF? Explain.

In WCF one-way mode, a client sends a request to the server but does not wait till the response comes. It does not care if the request is failed or succeeded. The Client will not be blocked in this case until it receives the response.

Posted Date:- 2021-09-20 09:34:24

Which styles of models are supported in WCF?

WCF service supports 2 styles of models:

RPC style: In RPC style we can use the serialize types and it provides the feature that is available for local calls.

Message style: In message style WCF allows the message header to be customized and it also allows us to define the security for body and header messages.

Posted Date:- 2021-09-20 09:33:52

What is the usage of "receiveTimeout" property in WCF?

The "recieveTimeout" property is used to get/set the time interval to makes a connection active.

Posted Date:- 2021-09-20 09:07:32

What is Exception Handling in WCF? What are the ways for WCF Exception Handling?

Exception handling is critical to all applications for troubleshooting the unexpected problems in applications. The Windows Communication Framework (WCF) provides several options for handling exceptions in WCF services. This article discusses these approaches and describes the advantages and disadvantages of each. The following options are provided to handle exceptions in WCF:

1. Using returnUnknownExceptionsAsFaults: Debugging Mode
2. Using FaultException: Best Option.
3. Using IErrorHandler: Only when the exception can't be handled by Fault

Posted Date:- 2021-09-20 09:06:22

What is REST and how to create a WCF RESTful Service ?


Representational State Transfer (REST) is a protocol for exchanging data over a distributed environment. The main idea behind REST is that we should treat our distributed services as a resource and we should be able to use simple HTTP protocols to perform various operations on that resource.


The JavaScript Object Notation (JSON) data format, or JSON for short, is derived from the literals of the JavaScript programming language. JSON helps us to present and exchange data in a self-descriptive, independent and light way. This data can then be easily consumed and transformed into JavaScript objects.

In most browser-based applications, WCF can be consumed using JavaScript, jQuery, AngularJS and so on. When a client makes a call to WCF, JSON or XML is used as the format of the communication. WCF has the option to send the response in JSON object. This can be configured with the WebGet orWebInvoke attribute and the WebHttpBinding. This allows you to expose a ServiceContract as a REST service that can be invoked using either JSON or plain XML.

GET: Retrieves the information.
PUT: Replaces the entire collection with another collection.
POST: Creates a new entry in the collection.
DELETE: Deletes the entire collection.

Posted Date:- 2021-09-20 09:05:34

What is WCF Data Service?

WCF Data Services uses OData (Open Data Protocol) protocol for querying or manipulating the data. WCF Data Services is built on top of WCF REST Services. It is a RESTful service to support CRUD operations on the database using the HTTP protocol. It supports all database operations using URI. DATA protocol can expose data from the relational database, File systems, Web sites, services etc. It supports XML or JSON format for exposing the data.

Posted Date:- 2021-09-20 09:04:39

What is service versioning?

After the initial deployment of the WCF service, you may need to change the service for a variety of reasons like as changing business needs or fixing others issues. Each change in your existing service introduces a new version of the service. Service versioning is helpful in backward compatibility with your existing clients.

Posted Date:- 2021-09-20 09:04:03

What is Impersonation?

Impersonation is a way to authorize a caller (client) identity to access the service domain’s resources. The service resources may be local files or database tables and should be on the same machine on which service is hosted. By default, impersonation is disabled and resources are accessed by using the WCF service's process identity.

Posted Date:- 2021-09-20 09:03:38

What is Transport Reliability in WCF?

"Transport Reliability" specifies the guarantee of delivering packets over a network as protocol TCP does. It also maintains the order of the packets as well as delivering of packets.

Posted Date:- 2021-09-20 09:02:19

What is the transport and message reliability?

Transport reliability: It offers point-to-point guaranteed delivery at the network packet level, as well as guarantees the order of the packets.

Message reliability: It deals with reliability with message level independent of how many packets are required to deliver the message.

Posted Date:- 2021-09-20 09:01:56

How can you test a WCF application without creating a client application?

There is a tool called - "wcftestclient.exe" used for testing the WCF service without creating a client application. This tool can be opened from visual studio command prompt.

Posted Date:- 2021-09-20 09:01:35

What is Concurrency Management in WCF?

Concurrency management is closely related to the Instance management in WCF but both are two different things. Instance management specifies how the service instances are created while Concurrency management specifies how many concurrent requests are handled by the service instances. By using concurrency, you can make your service instance thread-safe. By default, a per-call service instance is thread-safe since each request is served by a new service instance. A per-session service instance is not thread-safe since multiple requests of a client are served by a single service instance. Hence, it’s required concurrency management. A single service instance is not thread-safe since multiple requests of all clients are served by a single service instance. Hence, it’s required concurrency management.

Posted Date:- 2021-09-20 09:00:55

How many types of binding are there in WCF?

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

Posted Date:- 2021-09-20 09:00:26

What is the request-reply mode in WCF?

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.

Posted Date:- 2021-09-20 08:59:21

What are the different modes of communication in WCF?

There are three modes of communication in WCF:


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.


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.


It is the service to call the client. In which, service will act as client and client will act as service.

Posted Date:- 2021-09-20 08:59:00

How would you generate a proxy for WCF?

You can generate proxy by using the following steps:

Using Visual Studio

Using SvcUtil

Posted Date:- 2021-09-20 08:58:33

Explain the WCF RIA?

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.

Posted Date:- 2021-09-20 08:58:10

What is Instance Management in WCF?

WCF manages the session by creating the instance of the service class. This created instance(s) handle the incoming service request. In WCF, the session is the way of managing the services instance(s) so that the server can use these instances in an optimized way. At the server side, the InstanceContext class is used to manage service class instance. There are following instance management ways :

* Per Call

* Per Session

* Single

Posted Date:- 2021-09-20 08:57:22

What is Transaction Propagation? And how WCF support it?

Transaction propagation is the ability to propagate a transaction across the boundaries of a single service. Or in other words, we can say that a service can participate in a transaction that is initiated by a client.

In a SOA environment, transaction propagation becomes a key requirement. As we know, WCF supports SOA, so it provides support for transaction propagation as well.

Posted Date:- 2021-09-20 08:56:29

Why we need One Way Service?

There might be requirements where Service's Operation is not going to return any value. And at the same time client also does not bother about success or failure of service. Only for the client does calling the service matter. Client will call the operation and forget and continue with the operations.

One Way Operations

This is the way in WCF to achieve Fire and forget invocation of the service. Once the Client issues the call, WCF generates the request message and there is no corresponding response message for that. No Service side Exception will make their way to client.

Posted Date:- 2021-09-20 08:55:51

What is one-way operation?

When an operation has no return value, and the client does not care about the success or failure of the invocation. WCF offers one-way operations to support this sort of fire-and-forget invocation,: once the client issues the call, WCF generates a request message, but no correlated reply message will ever return to the client. The one-way message exchange pattern is useful when a client needs to send information to a service but doesn't receive a response.

Use the one-way design pattern:

When the client must call operations and is not affected by the result of the operation at the operation level.
When using the NetMsmqBinding or the MsmqIntegrationBinding class. (For more information about this scenario, see Queues in Windows Communication Foundation.)

Posted Date:- 2021-09-20 08:54:39

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

Posted Date:- 2021-09-20 08:51:46

Give the address format of all the bindings in WCF.

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

Posted Date:- 2021-09-20 08:51:07

Which are the different isolation levels in WCF?

Following is a list of different isolation levels in WCF:

<> Read Uncommitted: Also known as dirty isolation level. It makes sure that corrupt Data cannot be read. This is the lowest isolation level.
<> 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.
<> 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.
<> 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.
<> Snapshot: It raises an error on modifying a data that has already been changed by any transaction.

Posted Date:- 2021-09-20 08:50:31

What is the difference between ASMX web services and WCF?

The main difference between WCF and ASMX web service is that ASMX is designed to send and receive messages using SOAP over HTTP only while WCF facilitates you to send and receive messages using any format over any transport protocol.

Posted Date:- 2021-09-20 08:49:50

What are the hosting requirements for a web service?

The hosting requirements for a web service include – Availability, Reliability, Manageability, Versioning, Deployment, State, etc.

Posted Date:- 2021-09-20 08:49:23

What are the three types of transaction manager WCF supports?

The types of the transaction manager that WCF supports are

* Light Weight
* WS- Atomic Transaction
* OLE Transaction

Posted Date:- 2021-09-20 08:48:42

How do WCF works?

WCF follows the model "Software as a Service". In this model all units of functionality are defined as services and 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.

Posted Date:- 2021-09-20 08:48:13

What are the types of Data Contracts in WCF?

There are two types of Data Contracts

* Data Contract: Attribute used to define the class
* Data Member: Attribute used to define the properties

Posted Date:- 2021-09-20 08:47:52

What a WCF Service is

Windows Communication Foundation (WCF) was introduced in .NET 3.0. This is a great network distributed system developed by Microsoft for communication between applications. WCF is meant for designing and deploying distributed applications under a Service-Oriented Architecture (SOA) implementation. From MSDN: Windows Communication Foundation is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications that communicate across the web and the enterprise. WCF is a combined feature of Web Service, Remoting, MSMQ and COM+.

There are the following three main components of a WCF application.

1. WCF Service class: A WCF Service class implements some service as a set of methods.

2. WCF Service host: WCF supports four types of hosting, IIS, Windows Process Activation Services (WAS), self-hosting and Windows Services.

3. WCF Service endpoints: All communication with a Windows Communication Foundation (WCF) service occurs through the endpoints of the service. Usually the name of the Interface will be specified in the contract, so the client application will be aware of the operations that are exposed to the client.

Each endpoint contains:

* Address: An address that indicates where to find the service.
* Binding: A binding that specifies how a client can communicate with the service.
* Contract: A Contract that specifies what can the service do for us.

Posted Date:- 2021-09-20 08:47:20

What a Service is,

A Service is a program or application that is used by other applications. In other words, a service that is directly consumed by the end user to do their work and is something they ask for and recognize Or It's just self-contained business functionality.

Posted Date:- 2021-09-20 08:46:06

What is Self Hosting in WCF?

We have our project (it may be Windows or a web application or something else) and we want to host one WCF service within this solution locally. This type of hosting is called Self-Hosting. To implement self-hosting we need to include System.Service.Model.ServiceHost namespace.

The following are the advantages of self-hosting:

Is easy to use: With only a few lines of code you have your service running.

Is flexible: You can easily control the lifetime of your services through the Open() and Close() methods of ServiceHost<T>.

Is easy to debug: Debugging WCF services that are hosted in a self-hosted environment provides a familiar way of debugging, without having to attach to separate applications that activate your service.

Is easy to deploy: In general, deploying simple Windows applications is as easy as xcopy. You don't need any complex deployment scenarios on server farms, and the like, to deploy a simple Windows application that serves as a WCF ServiceHost.

Supports all bindings and transports: Self-hosting doesn't limit you to out-of-the-box bindings and transports whatsoever. On Windows XP and Windows Server 2003, IIS limits you to HTTP only.
The following are the disadvantages of self-hosting:

Limited availability: The service is reachable only when the application is running.

Limited features: Self-hosted applications have limited support for high availability, easy manageability, robustness, recoverability, versioning, and deployment scenarios. At least, out-of-the-box WCF doesn't provide these, so in a self-hosted scenario you have to implement these features yourself; IIS, for example, comes with several of these features by default.

Posted Date:- 2021-09-20 08:45:47

R4R Team
R4R provides WCF Freshers questions and answers (WCF Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,WCF interview questions for experienced,WCF Freshers & Experienced Interview Questions and Answers,WCF Objetive choice questions and answers,WCF Multiple choice questions and answers,WCF objective, WCF questions , WCF answers,WCF MCQs questions and answers R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for WCF fresher interview questions ,WCF Experienced interview questions,WCF fresher interview questions and answers ,WCF Experienced interview questions and answers,tricky WCF queries for interview pdf,complex WCF for practice with answers,WCF for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .