WCF 4.5 Multi-Layer Services Development with Entity Framework

WCF 4.5 Multi-Layer Services Development with Entity FrameworkReviews
Author: Mike Liu
Pub Date: 2012
ISBN: 978-1849687669
Pages: 394
Language: English
Format: PDF
Size: 13 Mb


This book is a step-by-step tutorial to guide you through learning WCF, Entity Framework, LINQ, and LINQ to Entities. You will be guided to create six WCF and Entity Framework solutions from scratch, of which three are multi-layered real-world WCF service solutions, so you will not only be reading, but also be coding through the book, to gain practical experience of WCF and Entity Framework. Various test clients will be associated with each solution and all solutions can be built and run independently of other solutions. Clear instructions and relevant screenshots will make sure you won’t get lost in the world of WCF and Entity Framework. Configuration files, host applications, test clients, and WCF services for each solution will also be available for download for you to examine, modify, and debug from the outside in. The book focuses on the essentials of using WCF and Entity Framework, rather than providing a reference to every single possibility. It leaves the reference material online where it belongs, and concentrates instead on practical examples, code, and advice.

  • What will you learn from this book:
  • Create a WCF service without using the built-in WCF templates so you can understand what’s going on under the hood.
  • Host a WCF service in IIS Express, ASP.NET Development Server, managed applications, IIS, and Windows Service.
  • Explore and learn different debugging options for a WCF service.
  • Build a multi-layer real-world WCF service from scratch to understand every layer of a WCF service and apply it to your real work.
  • Learn basic and advanced concepts and features of Entity Framework, LINQ, and LINQ to Entities.
  • Apply LINQ to Entities to the data access layer of a WCF service with Self Tracking Entities.
  • Control concurrent updates to the database with WCF and LINQ to Entities.
  • Add distributed transaction support to a WCF service.
  • Understand various security settings of WCF, and host a WCF service with Basic Authentication, SSL, and Windows Authentication.
  • Explore extension points of WCF and extend a WCF service with custom behaviors.

WCF transport security

WCF transport security is applied at the transport level on the byte stream below the message layer. In this case, a message does not have a security header and it does not carry any user authentication data. Transport security mode only provides point-to-point security between the two endpoints and it is the least flxible in terms of WS-Security usage because it is highly dependent on the transport layer. However, the transport security mode is the fastest in terms of performance, and it gives the best interoperability with client applications. The most common approach for transport security mode is to combine it with Secure Sockets Layer (SSL) or HTTPS to encrypt and sign the contents of all packets. We will secure a WCF service with transport security and SSL in later sections of this chapter.

WCF extension classes

To extend a WCF service, you fist need to create an extension class. As each extension point is modeled by an interface, you need to choose the proper interface to implement when creating an extension class. An extension class can implement a service (dispatcher) interface, a client (proxy) interface, or in some cases, both interfaces. If the extension class implements both the client and service interfaces, this same extension class can be used to extend a WCF service on both client and service sides.