Windows Communication Foundation
   HOME

TheInfoList



OR:

The Windows Communication Foundation (WCF), previously known as Indigo, is a free and open-source runtime and a set of
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
s in the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
for building connected, service-oriented applications. .NET Core 1.0, released 2016, did not support WCF server side code. WCF support was added to the platform with support for .NET Core 3.1, .NET 5, and .NET 6 in 2022.


The architecture

WCF is a tool often used to implement and deploy a
service-oriented architecture In software engineering, service-oriented architecture (SOA) is an architectural style that focuses on discrete services instead of a monolithic design. By consequence, it is also applied in the field of software design where services are provide ...
(SOA). It is designed using service-oriented architecture principles to support
distributed computing A distributed system is a system whose components are located on different networked computers, which communicate and coordinate their actions by passing messages to one another from any system. Distributed computing is a field of computer sci ...
where services have remote
consumers A consumer is a person or a group who intends to order, or uses purchased goods, products, or services primarily for personal, social, family, household and similar needs, who is not directly related to entrepreneurial or business activities. ...
. Clients can consume multiple services; services can be consumed by multiple clients. Services are loosely coupled to each other. Services typically have a
WSDL The Web Services Description Language (WSDL ) is an XML-based interface description language that is used for describing the functionality offered by a web service. The acronym is also used for any specific WSDL description of a web service (also ...
interface Interface or interfacing may refer to: Academic journals * ''Interface'' (journal), by the Electrochemical Society * '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics'' * '' Int ...
(Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as
WS-Addressing Web Services Addressing (WS-Addressing) is a specification of transport-neutral mechanism that allows web services to communicate addressing information. It essentially consists of two parts: a structure for communicating a reference to a Web ser ...
,
WS-ReliableMessaging WS-ReliableMessaging describes a protocol that allows SOAP messages to be reliably delivered between distributed applications in the presence of software component, system, or network failures. The original specification was written by BEA Syste ...
and
WS-Security Web Services Security (WS-Security, WSS) is an extension to SOAP to apply security to Web services. It is a member of the Web service specifications and was published by OASIS. The protocol specifies how integrity and confidentiality can be enfo ...
. With the release of
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
4.0, WCF also provides RSS Syndication Services,
WS-Discovery Web Services Dynamic Discovery (WS-Discovery) is a technical specification that defines a multicast discovery protocol to locate services on a local network. It operates over TCP and UDP port 3702 and uses IP multicast address or . As the name s ...
, routing and better support for
REST Rest or REST may refer to: Relief from activity * Sleep ** Bed rest * Kneeling * Lying (position) * Sitting * Squatting position Structural support * Structural support ** Rest (cue sports) ** Armrest ** Headrest ** Footrest Arts and enter ...
services.


Endpoints

A WCF client connects to a WCF service via an
endpoint An endpoint, end-point or end point may refer to: * Endpoint (band), a hardcore punk band from Louisville, Kentucky * Endpoint (chemistry), the conclusion of a chemical reaction, particularly for titration * Outcome measure, a measure used as an e ...
. Each service exposes its contract via one or more endpoints. An endpoint has an address (which is a URL specifying where the endpoint can be accessed) and binding properties that specify how the data will be transferred. The
mnemonic A mnemonic ( ) device, or memory device, is any learning technique that aids information retention or retrieval (remembering) in the human memory for better understanding. Mnemonics make use of elaborative encoding, retrieval cues, and imag ...
"ABC" can be used to remember
address An address is a collection of information, presented in a mostly fixed format, used to give the location of a building, apartment, or other structure or a plot of land, generally using political boundaries and street names as references, along ...
/ binding/
contract A contract is a legally enforceable agreement between two or more parties that creates, defines, and governs mutual rights and obligations between them. A contract typically involves the transfer of goods, services, money, or a promise to tr ...
. Binding specifies what
communication protocol A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchroniza ...
s are used to access the service, whether security mechanisms are to be used, and the like. WCF includes predefined bindings for most common communication protocols such as
SOAP Soap is a salt of a fatty acid used in a variety of cleansing and lubricating products. In a domestic setting, soaps are surfactants usually used for washing, bathing, and other types of housekeeping. In industrial settings, soaps are use ...
over HTTP, SOAP over TCP, and SOAP over Message Queues, etc. Interaction between WCF endpoint and client is done using a SOAP envelope. SOAP envelopes are in simple XML form, which makes WCF platform-independent. When a client wants to access the service via an endpoint, it not only needs to know the contract, but it also has to adhere to the binding specified by the endpoint. Thus, both client and server must have compatible endpoints. With the release of the .NET Framework 3.5 in November 2007, Microsoft released an encoder that added support for the JSON serialization format to WCF.


Behaviors

Behaviors are types that modify or extend service or client functionality. Behaviors allow the developer to create custom processing, transformation, or inspection that is applied to messages as they are sent or received. Some examples of uses for behaviors are: * Controlling whether metadata is published with a service. * Adding security features to a service, such as impersonation,
authorization Authorization or authorisation (see spelling differences) is the function of specifying access rights/privileges to resources, which is related to general information security and computer security, and to access control in particular. More fo ...
, or managing tokens * Recording information about messages, such as tracking, tracing, or logging * Message or parameter validation * Invoking all additional operations when messages are received—such as notifying users when certain messages arrive Behaviors implement the IServiceBehavior interface for service extensions, the IEndpointBehavior for endpoints, the IContractBehavior interface for service contracts, or the IOperationBehavior for operations. Service behaviors are used for message processing across a service, rather than processing that would be specific to a single operation.


Interoperability

WCF supports interoperability with WCF applications running on the same Windows machine or WCF running on a different Windows machines or standard Web services built on platforms such as
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mos ...
running on Windows or other operating systems. In addition to SOAP, WCF 4 supports non-SOAP XML, RSS, JSON, and binary formats for external communication via HTTP or
HTTPS Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP). It is used for secure communication over a computer network, and is widely used on the Internet. In HTTPS, the communication protocol is enc ...
.


See also

* Microsoft Connected Services Framework * Web Services Enhancements * Service Component Architecture (SCA) and
Service Data Objects Service Data Objects is a technology that allows heterogeneous data to be accessed in a uniform way. The SDO specification was originally developed in 2004 as a joint collaboration between Oracle ( BEA) and IBM and approved by the Java Community ...
(SDO), which are alternatives to WCF in the Java world standardized by OASIS. * WCF Data Services


References

* *


Further reading

* Craig McMurtry, Marc Mercuri, and Nigel Watling: ''Microsoft Windows Communication Foundation: Hands-On'', SAMS Publishing, May 26, 2004, * Steve Resnick, Richard Crane, Chris Bowen: ''Essential Windows Communication Foundation (WCF): For .NET Framework 3.5'', Addison-Wesley, February 11, 2008, * Craig McMurtry, Marc Mercuri, Nigel Watling, Matt Winkler: ''Windows Communication Foundation Unleashed (WCF)'', Sams Publishing, March 6, 2007, * Juval Löwy: ''Programming WCF Service'', O'Reilly Media, Inc., February 20, 2007, * Pablo Cibraro, Kurt Claeys, Fabio Cozzolino, Johann Grabner: ''Professional WCF 4: Windows Communication Foundation with .NET 4'', Wrox, June 15, 2010, * Andrew Zhu: ''Microsoft Windows Workflow Foundation 4.0 Cookbook:Chapter 3'', Packt Publishing, September 2010,


External links


Windows Communication Foundation
MSDN Windows Communication Foundation portal.
MSDN Library: Windows Communication FoundationWCF Security Guide
Microsoft Patterns & Practices - Improving Web Services Security: Scenarios and Implementation Guidance for WCF. Released Aug 1, 2008.
Understanding WCF Services in Silverlight 2
- In depth explanation of WCF services for Silverlight clients.
David Chappell: "Introduction to WCF" and "Dealing with Diversity"
two papers covering WCF. November 2007.
Getting Started with WCF RIA Services
- part 1 of the series articles on WCF RIA Services {{Microsoft FOSS .NET terminology Windows communication and services Formerly proprietary software Free and open-source software Communication Foundation Microsoft free software Object request broker Software using the MIT license Windows Server 2008 Windows Vista Windows Communication Foundation Windows Communication Foundation 2006 software