"Whether this is the first time or the fifty-first time yours"re using WCF, yours"ll learn something new by reading this book." --Nicholas Allen, Program Manager, Web Services, Microsoft Windows Communication Foundation (WCF) is the easiest way to produce and consume Web services on the Microsoft platform. With .NET 3.5, WCF has been extensively revamped--and Visual Studio 2008 gives developers powerful new tools for utilizing it. Essential Windows Communication Foundation shows developers exactly how to make the most of WCF with .NET 3.5 and Visual Studio 2008. Drawing on extensive experience working with early adopters, three Microsoft insiders systematically address the topics developers ask about WCF. The authors approach each subject with practical advice and present best practices, tips, and tricks for solving problems. Throughout, yours"ll find detailed explanations, solutions for the "pain points" of WCF development, and an extensive collection of reusable code examples. Coverage includes Using WCF contracts to define complex structures and interfaces Understanding WCFrs"s channel stacks and channel model architecture Configuring the WCF communication stack to use only the protocols you need Using standard and custom service behaviors to manage concurrency, instances, transactions, and more Serializing data from .NET types to XML Infosets and representing Infosets "on the wire" Hosting WCF services via IIS, managed .NET applications, and Windows Activation Services WCF security, in depth: authentication; transport and message-level security; and Internet and intranet scenarios Improving reliability: exception handling, diagnostics, and more Workflow services: new integration points between WCF 3.5 and Windows Workflow Foundation Building client-to-client, peer network-based applications Utilizing WCF for non-SOAP Web services: AJAX and JSON examples and .NET 3.5 hosting classes Microsoftrs"sSteve Resnick,Richard Crane, andChris Bowenare technology experts at the Microsoft Technology Center in Boston. They specialize in helping customers improve their technical agility by applying WCF and related technologies. Resnick has specialized in Internet technologies and distributed computing at Microsoft since 1995. He is a frequent speaker at Microsoft events and is now technology director for the U.S. Microsoft Technology Centers. Crane has more than 15 years of experience in senior software development roles. He specializes in large-scale Web sites, distributed computing, transactional systems, and performance analysis. Bowen has been an architect and developer for more than 15 years at companies such as Monster.com and Staples and is co-author of Professional Visual Studio 2005 Team System. Foreword xxv Preface xxvii Chapter 1: Basics 1 Chapter 2: Contracts 33 Chapter 3: Channels 91 Chapter 4: Bindings 111 Chapter 5: Behaviors 181 Chapter 6: Serialization and Encoding 241 Chapter 7: Hosting 287 Chapter 8: Security 315
Author Biography
Steve Resnick has worked at Microsoft since the mid-1990s, spanning architect, developer, and evangelist roles in the field. He specializes in Internet technologies, architecting and designing high-volume, high-value Web applications. Steve is the National Technology Director for the Microsoft Technology Centers in the United States, where he sets strategy and direction so that his team can solve the toughest customer challenges. He has worked with .NET since the beginning and is an expert in Web services, BizTalk, transaction processing, and related technologies. He holds a M.S. and B.S. in Computer Science from Boston University and University of Delaware, respectively.
Rich Crane is a Technical Architect at the Microsoft Technology Center in Waltham, Massachusetts. A software architect and engineer with more than 18 years of experience, Rich has spent the last six years helping customers architect and build solutions on the Microsoft platform. He has worked with numerous Microsoft products and technologies and is an expert in BizTalk, SQL Server, SharePoint, Compute Cluster Server, and of course Visual Studio and the .NET Framework. He has spoken at conferences and community events such as TechEd and Code Camp. He graduated Summa Cum Laude from Drexel University with a B.S. degree in Electrical and Computer Engineering.
Chris Bowen is Microsoft’s Developer Evangelist for the northeastern United States, specializing in development tools, platforms, and architectural best practices. Asoftware architect and engineer with 15 years of experience, Chris joined Microsoft after holding senior positions at companies such as Monster.com, VistaPrint, Staples, and IDX Systems, and consulting on Web presence and e-commerce projects with others. He is coauthor of Professional Visual Studio 2005 Team System (2006, WROX) and holds an M.S. in Computer Science and a B.S. in Management Information Systems, both from Worcester Polytechnic Institute.
Table of Contents
Basics | p. 1 |
Contracts | p. 33 |
Channels | p. 91 |
Bindings | p. 111 |
Behaviors | p. 181 |
Serialization and Encoding | p. 241 |
Hosting | p. 287 |
Security | p. 315 |
Diagnostics | p. 375 |
Exception Handling | p. 403 |
Workflow Services | p. 423 |
Peer Networking | p. 459 |
Programmable Web | p. 503 |
Advanced Topics | p. 537 |
Index | p. 553 |
Table of Contents provided by Blackwell. All Rights Reserved. |
Excerpts
= 0) {slash = '\\';} else {slash = '/';}openLoc = figLoc.substring(0, figLoc.lastIndexOf(slash) + 1);while (pPage.substring(0,3) == '../') {openLoc = openLoc.substring(0, openLoc.lastIndexOf(slash, openLoc.length - 2)+ 1);pPage = pPage.substring(3, pPage.length + 1);}popUpWin =window.open('','popWin','resizable=1,scrollbars=1,location=0,toolbar=0,width=525,height=394');figDoc = popUpWin.document;zhtm= ' ' + pPage + ' ';zhtm += ' ';zhtm += ' ';zhtm += ' ';zhtm += '' + pPage.substring(pPage.lastIndexOf('/') + 1, pPage.length) + '';zhtm += ' ';figDoc.write(zhtm);figDoc.close();}// modified 3.1.99 RWE v4.1 --> Essential WCF PrefaceWindows Communication Foundation (WCF) is the unified programming model for writing distributed applications on the Microsoft platform. It subsumes the prior technologies of ASMX, .NET Remoting, DCOM, and MSMQ and provides an extensible API to meet a wide variety of distributed computing requirements. Prior to WCF, you needed to master each of those technologies to select the right approach for a particular distributed application requirement. WCF simplifies this considerably by providing a unified approach.XML Web Services is the most common technique for distributed computing in modern applications. They're used to expose technical and business functions on private or public networks. Sometimes they use the SOAP specification, sometimes they don't. They typically transmit information as text documents containing angle brackets, but not always. They generally use HTTP for the transport, but again, not always. WCF is a framework for working with XML Web Services and is compatible with most technology stacks.Rich, Chris, and I have each developed code with .NET from the beginning (circa 1999). We work at Microsoft in the field, helping customers use WCF to solve real-world problems. Our customers range from large multinational corporations to ISVs to Web startups. Each has different challenges, needs, and priorities that we individually address. We show them what's possible, recommend what works well, and steer clear of what doesn't. We have experience building distributed applications and leverage that experience in teaching others about WCF.Our goal for this book is to present WCF in a way that can immediately be put to use by software developers. We cover the material in enough detail that you know how and why to use different features. We go a bit further in most cases, describing some of the subtleties in the framework, but not so far as to document the API.The Blogosphere is rich with WCF details. Much of it comes from the .NET product team and much of it comes from other developers learning it along the way. We made extensive use of Blogs as s