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 ...