What is the difference between WCF Service and Web Service?

WCF Service supports both http and tcp protocol while webservice supports only http protocol. WCF Service is more flexible than web service. Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp… Continue reading

Define Service Contracts and Operation Contracts in WCF?

Service Contract – An interface that exposes the service operations is usually decorated with the service contract attribute. Always provide meaningful Namespace and Name to a service contract as shown in the example below. Operation Contract – All methods in a service contract should have OperationContract attribute. You can also… Continue reading

What is binding and how many types of bindings are there in WCF?

A binding defines how an endpoint communicates to the world. A binding defines the transport (such as HTTP or TCP) and the encoding being used (such as text or binary). A binding can contain binding elements that specify details like the security mechanisms used to secure messages, or the message… Continue reading

What is the advantage of using WCF over other distributed programming models like Web Services(ASMX), .NET Remoting, Enterprise Services stack etc.?

To understand the advantage of using WCF over other distributed programming models like Web Services(ASMX), .NET Remoting, Enterprise Services stack etc, let’s consider the following scenario. We have developed an application using web services. As we know web services use HTTP protocl and XML SOAP formatted messages, they are good… Continue reading

What is the role of WSDL in WCF?

WSDL stands for Web Service Description Language. The WCF service exposes the WSDL document for the clients, to generate proxies and the configuration file. The WSDL file provides the following information for the consumers of the WCF service. Provides the information about the service contract and operations available. Provides the… Continue reading

Why are WCF Services are considered as loosely coupled?

WCF Services are considered as loosely coupled because WCF services are not tightly bound to a particular protocol, encoding format, or hosting environment. All of these are configurable. At the time of designing WCF services, we don’t have to worry about what protocol, encoding format, or hosting environment to use… Continue reading

What is WCF?

WCF stands for Windows Communication Foundation. It is a Software development kit for developing services on Windows. WCF is introduced in .NET 3.0. in the System.ServiceModel namespace. WCF is based on basic concepts of Service oriented architecture (SOA) WCF unifies ASMX, Remoting, and Enterprise Services stacks and provides a single programming… Continue reading