Chapter 43Windows Communication Foundation

WHAT’S IN THIS CHAPTER?

  • WCF overview
  • Creating a simple service and client
  • Defining service, operation, data, and message contracts
  • Implementing a service
  • Using binding for communication
  • Creating different hosts for services
  • Creating clients with a service reference and programmatically
  • Using duplex communication
  • Using routing

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter at www.wrox.com/go/procsharp on the Download Code tab. The code for this chapter is divided into the following major examples:

  • Simple service and client
  • WebSocket
  • Duplex communication
  • Routing

WCF OVERVIEW

Windows Communication Foundation (WCF) is the flexible communication technology of the .NET Framework. Previous to .NET 3.0, several communication technologies were required in a single enterprise solution. For platform-independent communication, ASP.NET Web services were used. For more advanced web services — technologies such as reliability, platform-independent security, and atomic transactions — Web Services Enhancements added a complexity layer to ASP.NET web services. If the communication needed to be faster, and both the client and service were .NET applications, .NET Remoting was the technology of choice. .NET Enterprise Services with its automatic transaction support, by default, used the DCOM protocol, which was even faster than .NET Remoting. DCOM was also the only protocol to allow the passing of ...

Get Professional C# 5.0 and .NET 4.5.1 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.