
Microsoft® Windows® Communication Foundation Step by Step John Sharp (Content Master) To learn more about this book, visit Microsoft Learning at http://www.microsoft.com/MSPress/books/10022.aspx 9780735623361 Publication Date: January 2007 Table of Contents Acknowledgments . xi Introduction . xiii 1 Introducing Windows Communication Foundation . 1 What Is Windows Communication Foundation? . 1 The Early Days of Personal Computer Applications . 1 Inter-Process Communications Technologies . 2 The Web and Web Services . 3 Using XML as a Common Data Format . 3 Sending and Receiving Web Service Requests . 4 Handling Security and Privacy in a Global Environment. 5 The Purpose of Windows Communication Foundation . 6 Building a WCF Service . 7 Defining Contracts . 12 Implementing the Service . 14 Configuring, Deploying, and Testing the WCF Service . 18 Building a WCF Client. 24 Service-Oriented Architectures and Windows Communication Foundation. 28 Summary . 30 2 Hosting a WCF Service . 31 How Does a WCF Service Work? . 31 Service Endpoints . 32 Processing a Client Request . 33 Hosting a WCF Service in a User Application . 35 Using the ServiceHost Class. 35 Building a Windows Presentation Foundation Application to Host a WCF Service . 38 Reconfiguring the Service to Use Multiple Endpoints. 44 What do you think of this book? We want to hear from you! Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you. To participate in a brief online survey, please visit: www.microsoft.com/learning/booksurvey/ v vi Table of Contents Understanding Bindings . 47 The WCF Predefined Bindings . 47 Configuring Bindings . 50 Hosting a WCF Service in a Windows Service . 52 Summary . 57 3 Making Applications and Services Robust . 59 CLR Exceptions and SOAP Faults . 60 Throwing and Catching a SOAP Fault . 60 Using Strongly-Typed Faults . 65 Reporting Unanticipated Exceptions . 73 Managing Exceptions in Service Host Applications . 76 ServiceHost States and Transitions. 76 Handling Faults in a Host Application . 77 Handling Unexpected Messages in a Host Application . 78 Summary . 80 4 Protecting an Enterprise WCF Service . 81 What Is Security?. 81 Authentication and Authorization in a Windows Environment. 83 Transport and Message Level Security . 84 Implementing Security in a Windows Domain . 86 Protecting a TCP Service at the Message Level . 86 Protecting an HTTP Service at the Transport Level . 93 Protecting an HTTP Service at the Message Level. 100 Authenticating Windows Users . 102 Authorizing Users . 108 Using Impersonation to Access Resources . 114 Summary . 116 5 Protecting a WCF Service over the Internet . 117 Authenticating Users and Services in an Internet Environment . 118 Authenticating and Authorizing Users by Using the SQL Membership Provider and the SQL Role Provider . 118 Authenticating and Authorizing Users by Using Certificates. 132 Authenticating a Service by Using a Certificate. 142 Summary . 148 Table of Contents vii 6 Maintaining Service Contracts and Data Contracts . 149 Modifying a Service Contract . 150 Selectively Protecting Operations. 150 Versioning a Service . 156 Making Breaking and Nonbreaking Changes to a Service Contract. 163 Modifying a Data Contract . 165 Data Contract and Data Member Attributes. 166 Data Contract Compatibility . 176 Summary . 179 7 Maintaining State and Sequencing Operations . 181 Managing State in a WCF Service. 182 Service Instance Context Modes. 193 Maintaining State with the PerCall Instance Context Mode. 198 Selectively Controlling Service Instance Deactivation . 204 Sequencing Operations in a WCF Service . 206 Summary . 211 8 Supporting Transactions . 213 Using Transactions in the ShoppingCartService Service . 214 Implementing OLE Transactions . 214 Implementing WS-AtomicTransaction Transactions. 229 Designing a WCF Service to Support Transactions . 231 Transactions and Service Instance Context Modes . 231 Transactions and Messaging . 232 Transactions and Multi-Threading . 232 Long-Running Transactions . 233 Summary . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages42 Page
-
File Size-