Chapter 32

Windows Communication Foundation (WCF)

WHAT’S IN THIS CHAPTER?

  • Understanding WCF services
  • Creating a WCF service
  • Configuring WCF service endpoints
  • Hosting a WCF service
  • Consuming a WCF service

Most systems require a means to communicate between their various components — most commonly between the server and the client. Many different technologies enable this sort of communication, but Windows Communication Foundation (WCF) brings a unified architecture to implementing them. This chapter takes you through the architecture of WCF services and how to create, host, and consume WCF services in your system.

WHAT IS WCF?

Within the .NET Framework there are a variety of ways that you can communicate among applications, including (but not limited to) remoting, web services, and a myriad of networking protocols. This has often frustrated application developers who not only had to pick the appropriate technology to use, but also had to write plumbing code that would allow their applications to use different technologies depending on where or how they would be deployed. For example, when users connect directly to the intranet, it is probably better for them to use a remoting or direct TCP/IP connection for their speed benefits. However, these aren’t the ideal solution for communication when the application is outside the corporate firewall, in which case a secured web service would be preferable.

WCF is designed to solve this sort of problem by providing a means to build messaging ...

Get Professional Visual Studio 2012 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.