O'Reilly logo

Professional C# 2008 by Karli Watson, Morgan Skinner, Jay Glynn, Bill Evjen, Christian Nagel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 42

Windows Communication Foundation

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, was using the DCOM protocol that was even faster than .NET Remoting. DCOM was also the only protocol to allow passing transactions. All of these technologies have different programming models that require many skills from the developer.

.NET Framework 3.0 introduced a new communication technology that includes all the features from the predecessors and combines them into one programming model: Windows Communication Foundation (WCF).

In particular, this chapter discusses the following topics:

  • WCF overview
  • A simple service and client
  • Contracts
  • Service implementation
  • Binding
  • Hosting
  • Clients
  • Duplex communication

WCF Overview

WCF combines the functionality from ASP.NET Web services, .NET Remoting, Message Queuing, and Enterprise Services. What you get from WCF is:

  • Hosting for components and services — Just as you can use custom hosts with .NET Remoting and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required