.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
sivanagamahesh


Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.


Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/PracticesIISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

WCF Interview Questions and Answers

What are the Advantages and Disadvantages of WCF?

Author: Santhakumar Munuswamy          Posted Date: December 27, 2015    Category: WCF     Points: 40

Advantages

1. WCF provides better reliability and security compared to ASMX Web services.

2. In WCF, there is no need to make much of a change to code to use the security model and alter the binding.

3. Small changes in the configuration file will match your requirements.

4. WCF provides interoperability between services.

Disadvantages

1. WCF does not support method overloading functions.

What are the types of Binding in WCF?

Author: Santhakumar Munuswamy          Posted Date: September 06, 2015    Category: WCF     Points: 40

Binding is nothing; how the service can be access with different endpoints.

Types of Binding

1. BasicHttpBinding
2. WsHttpBinding
3. WsDualHttpBinding
4. WsFederationHttpBinding
5. NetTcpBinding
6. NetNamedPipeBinding
7. NetMsMqBinding
8. NetPeerTcpBinding

What are the types of contract in WCF?

Author: Santhakumar Munuswamy          Posted Date: September 06, 2015    Category: WCF     Points: 40

WCF support four types of contract as following
1. Service Contracts
2. Data Contracts
3. Message Contracts
4. Fault Contracts

How to enable the Performance Counters in WCF?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

Simple way to enable Performance Counters supported by WCF is as follows:
<system.serviceModel>
<diagnostics performanceCounters = "All" />
</system.serviceModel>
Above configuration setting will enable all categories of counters including ServiceModelService, ServiceModelEndpoint and ServiceModelOperation. Default value for it is "Off".

What is the role of transaction manager in WCF?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

Transaction manager while sitting on client side, initiate the transaction and coordinates with all the processes that participate in a distributed transaction to commit or roll back.

What is two-phase committed protocol?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

In a distributed transaction scenario, two-phase committed protocol is an algorithm that ensures all the participating processes in a distributed transaction are ready to be committed or roll backed. This is done in two phases i.e. Prepare phase and Commit phase.

What are the various Transaction Flow Options available in WCF?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

If a service is configured for Transaction Propagation, WCF further supports various options for service methods to be part of any transaction initiated outside service boundaries.
. NotAllowed Transaction Propagation is not allowed for particular service method. Its default value.
. Allowed Transaction Propagation is allowed but not compulsory.
. Mandatory Transaction Propagation is compulsory for that service method.
For example, Transaction Propagation is mandatory for CreditAccount service method in following code snippet.
[ServiceContract]
interface IPaymentService
{
[OperationContract]
[TransactionFlow(TransactionFlowOption.Mandatory)]
void CreditAccount(..);
}

Does all WCF bindings support for Transaction Propagation?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

No. Not all WCF bindings support transaction propagation. Only following list of bindings support for it.
. wsHttpBinding
. netTcpBinding
. netNamedPipeBinding
. wsDualHttpBinding
. wsFederationHttpBinding

What is Transaction Propagation? And how WCF support it?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

Transaction propagation is the ability to propagate 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 that WCF supports SOA, so it provides support for transaction propagation as well.
To enable transaction propagation, we need to set the value of TransactionFlow property of the binding being used. This can be done programmatically as follows:
WSHttpBinding bindingBeingUsed = new WSHttpBinding();
bindingBeingUsed.TransactionFlow = "true";
Or It can be done declaratively by updating configuration file as follows:
<bindings>
<wsHttpBinding>
<binding name="binding1"
transactionFlow="true" />
</wsHttpBinding>
</bindings>
Default value for TransactionFlow property is "False".

What is ESB in SOA environment?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

In Service Oriented Architecture environment, ESB (Enterprise Service Bus) acts as a single interface for all messaging between applications and services in a loosely coupled manner. ESB is capable to call and subscribe different service provider's methods and subscriptions respectively.
« Previous12345678910….1516Next »



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend