
Programming WCF Services
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Programming WCF Services is the authoritative, bestselling guide to Microsoft's unified platform for developing modern, service-oriented applications on Windows. Hailed as the definitive treatment of WCF, this guide provides unique insight, rather than documentation, to help you learn the topics and skills you need for building maintainable, extensible, and reusable WCF-based applications.
Authors Juval Löwy?one of the world's top .NET experts?and Michael Montgomery have revised this edition to include the productivity-enhancing features of .NET Framework 4.6, along with the latest WCF ideas and techniques. By teaching you the why and the how of WCF programming, this book will help you master WCF and make you a better software engineer.
- Learn WCF's architecture and essential building blocks, including key concepts such as reliability and transport sessions
- Use built-in features such as service contracts, instance and concurrency management, transactions, queued services, and security
- Increase the quality of your WCF services by using design options, tips, and best practices in Löwy's ServiceModelEx framework
- Understand the rationale behind particular design decisions, and rarely understood aspects of WCF development
- Learn why Azure Service Fabric is the killer app for modern DevOps
More details
Other editions
Additional editions

Previous edition

Content
- Intro
- Copyright
- Table of Contents
- Preface
- Conventions Used in This Book
- How This Book Is Organized
- Introducing Michael "Monty" Montgomery
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Chapter 1. WCF Essentials
- What Is WCF?
- Services
- Service Execution Boundaries
- WCF and Location Transparency
- Addresses
- TCP Addresses
- HTTP Addresses
- IPC Addresses
- MSMQ Addresses
- WebSocket Addresses
- UDP Addresses
- Contracts
- The Service Contract
- Hosting
- IIS Hosting
- Self-Hosting
- WAS Hosting
- Custom Hosting in IIS/WAS
- Choosing a Host
- Bindings
- The Common Bindings
- Choosing a Binding
- Additional Bindings
- Using a Binding
- Endpoints
- Administrative Endpoint Configuration
- Programmatic Endpoint Configuration
- Default Endpoints
- The Configure() Method
- Metadata Exchange
- Metadata over HTTP-GET
- The Metadata Exchange Endpoint
- The Metadata Explorer
- More on Behavior Configuration
- Client-Side Programming
- Generating the Proxy
- Administrative Client Configuration
- Programmatic Client Configuration
- The WCF-Provided Test Client
- Programmatic Versus Administrative Configuration
- Configuration Policy
- WCF Architecture
- Host Architecture
- Working with Channels
- The InProcFactory Class
- Transport-Level Sessions
- Transport Session and Binding
- Transport Session Termination
- Reliability
- Bindings, Reliability, and Ordered Messages
- Configuring Reliability
- Requiring Ordered Delivery
- Chapter 2. Service Contracts
- Operation Overloading
- Contract Inheritance
- Client-Side Contract Hierarchy
- Service Contract Factoring and Design
- Contract Factoring
- Factoring Metrics
- Contract Queries
- Programmatic Metadata Processing
- The MetadataHelper Class
- Chapter 3. Data Contracts
- Serialization
- .NET Serialization
- The WCF Formatters
- Data Contract via Serialization
- Data Contract Attributes
- Importing a Data Contract
- Data Contracts and the Serializable Attribute
- Inferred Data Contracts
- Composite Data Contracts
- Data Contract Events
- Shared Data Contracts
- Data Contract Hierarchy
- Known Types
- Service Known Types
- Multiple Known Types
- Configuring Known Types
- Data Contract Resolvers
- Objects and Interfaces
- Data Contract Equivalence
- Serialization Order
- Versioning
- New Members
- Missing Members
- Versioning Round-Trip
- Data Contract Factoring and Design
- Data Contract Design
- Data Contract Factoring
- Operation Factoring
- The Data Transfer Object Pattern
- Enumerations
- Delegates and Data Contracts
- Generics
- Collections
- Concrete Collections
- Custom Collections
- The CollectionDataContract Attribute
- Referencing a Collection
- Dictionaries
- Chapter 4. Instance Management
- Behaviors
- Per-Call Services
- Benefits of Per-Call Services
- Configuring Per-Call Services
- Per-Call Services and Transport Sessions
- Designing Per-Call Services
- Choosing Per-Call Services
- Per-Session Services
- Configuring Private Sessions
- Sessions and Reliability
- The Session ID
- Session Termination
- Singleton Service
- Initializing a Singleton
- Choosing a Singleton
- Demarcating Operations
- Instance Deactivation
- Configuring with ReleaseInstanceMode.None
- Configuring with ReleaseInstanceMode.BeforeCall
- Configuring with ReleaseInstanceMode.AfterCall
- Configuring with ReleaseInstanceMode.BeforeAndAfterCall
- Explicit Deactivation
- Using Instance Deactivation
- Durable Services
- Durable Services and Instance Management Modes
- Instance IDs and Durable Storage
- Explicit Instance IDs
- Instance IDs in Headers
- Context Bindings for Instance IDs
- Automatic Durable Behavior
- Throttling
- Configuring Throttling
- Chapter 5. Operations
- Request-Reply Operations
- One-Way Operations
- Configuring One-Way Operations
- One-Way Operations and Reliability
- One-Way Operations and Sessionful Services
- One-Way Operations and Exceptions
- Callback Operations
- The Callback Contract
- Client Callback Setup
- Service-Side Callback Invocation
- Callback Connection Management
- The Duplex Proxy and Type Safety
- The Duplex Factory
- Callback Contract Hierarchy
- Events
- Streaming
- I/O Streams
- Streaming and Binding
- Streaming and Transport
- Chapter 6. Faults
- Error Isolation and Decoupling
- Error Masking
- Channel Faulting
- Fault Propagation
- Fault Contracts
- Fault Debugging
- Faults and Callbacks
- Error-Handling Extensions
- Providing a Fault
- Handling a Fault
- Installing Error-Handling Extensions
- The Host and Error Extensions
- Callbacks and Error Extensions
- Chapter 7. Transactions
- The Recovery Challenge
- Transactions
- Transactional Resources
- Transaction Properties
- Transaction Management
- Resource Managers
- Transaction Propagation
- Transaction Flow and Bindings
- Transaction Flow and the Operation Contract
- One-Way Calls
- Transaction Protocols and Managers
- Protocols and Bindings
- Transaction Managers
- Transaction Manager Promotion
- The Transaction Class
- The Ambient Transaction
- Local Versus Distributed Transactions
- Transactional Service Programming
- Setting the Ambient Transaction
- Transaction Propagation Modes
- Voting and Completion
- Transaction Isolation
- Transaction Timeout
- Explicit Transaction Programming
- The TransactionScope Class
- Transaction Flow Management
- Non-Service Clients
- Service State Management
- The Transaction Boundary
- Instance Management and Transactions
- Per-Call Transactional Services
- Per-Session Transactional Services
- Transactional Durable Services
- Transactional Behavior
- Transactional Singleton Service
- Instancing Modes and Transactions
- Callbacks
- Callback Transaction Modes
- Callback Voting
- Using Transactional Callbacks
- Chapter 8. Concurrency Management
- Instance Management and Concurrency
- Service Concurrency Modes
- ConcurrencyMode.Single
- ConcurrencyMode.Multiple
- ConcurrencyMode.Reentrant
- Instances and Concurrent Access
- Per-Call Services
- Sessionful and Singleton Services
- Resources and Services
- Deadlocked Access
- Deadlock Avoidance
- Resource Synchronization Context
- .NET Synchronization Contexts
- The UI Synchronization Context
- Service Synchronization Context
- Hosting on the UI Thread
- A Form as a Service
- The UI Thread and Concurrency Management
- Custom Service Synchronization Contexts
- The Thread Pool Synchronizer
- Replacing the I/O Completion Thread Pool
- Thread Affinity
- Priority Processing
- Callbacks and Client Safety
- Callbacks with ConcurrencyMode.Single
- Callbacks with ConcurrencyMode.Multiple
- Callbacks with ConcurrencyMode.Reentrant
- Callbacks and Synchronization Contexts
- Callbacks and the UI Synchronization Context
- Callback Custom Synchronization Contexts
- Asynchronous Calls
- Requirements for an Asynchronous Mechanism
- Proxy-Based Asynchronous Calls
- Asynchronous Invocation
- Polling or Waiting for Completion
- Continuations
- One-Way Asynchronous Operations
- Asynchronous Error Handling
- Asynchronous Calls and Transactions
- Synchronous Versus Asynchronous Calls
- Asynchronous Service Operations
- Chapter 9. Queued Services
- Disconnected Services and Clients
- Queued Calls
- Queued Calls Architecture
- Queued Contracts
- Configuration and Setup
- Transactions
- Delivery and Playback
- Service Transaction Configuration
- Nontransactional Queues
- Instance Management
- Per-Call Queued Services
- Sessionful Queued Services
- Singleton Service
- Concurrency Management
- Throttling
- Delivery Failures
- The Dead-Letter Queue
- Time to Live
- Configuring the Dead-Letter Queue
- Processing the Dead-Letter Queue
- Playback Failures
- Poison Messages
- Poison Message Handling
- Queued Versus Connected Calls
- Requiring Queuing
- The Response Service
- Designing a Response Service Contract
- Client-Side Programming
- Queued Service-Side Programming
- Response Service-Side Programming
- Transactions
- The HTTP Bridge
- Designing the Bridge
- Transaction Configuration
- Service-Side Configuration
- Client-Side Configuration
- Chapter 10. Security
- Authentication
- Authorization
- Transfer Security
- Transfer Security Modes
- Transfer Security Mode Configuration
- Transport Security and Credentials
- Message Security and Credentials
- Identity Management
- Overall Policy
- Scenario-Driven Approach
- Intranet Application Scenario
- Securing the Intranet Bindings
- Constraining Message Protection
- Authentication
- Identities
- The Security Call Context
- Impersonation
- Authorization
- Identity Management
- Callbacks
- Internet Application Scenario
- Securing the Internet Bindings
- Message Protection
- Authentication
- Using Windows Credentials
- Using the ASP.NET Providers
- Identity Management
- Business-to-Business Application Scenario
- Securing the Business-to-Business Bindings
- Authentication
- Authorization
- Identity Management
- Host Security Configuration
- Anonymous Application Scenario
- Securing the Anonymous Bindings
- Authentication
- Authorization
- Identity Management
- Callbacks
- No Security Scenario
- Unsecuring the Bindings
- Authentication
- Authorization
- Identity Management
- Callbacks
- Scenarios Summary
- Declarative Security Framework
- The SecurityBehaviorAttribute
- Host-Side Declarative Security
- Client-Side Declarative Security
- Security Auditing
- Configuring Security Audits
- Declarative Security Auditing
- Chapter 11. The Azure Service Fabric
- Why Azure Service Fabric
- An Integrated Platform
- Design Consistency
- Programming Model Consistency
- Future Compatible
- Preparing for the Service Fabric
- ServiceModelEx.ServiceFabric
- Configuring the Service Fabric
- IT Operations
- Development
- Both
- Programming the Service Fabric
- The Service Programming Model
- Reliable Services
- Reliable Actors
- State Management
- Hosting
- The Client Programming Model
- Modeling the Service Fabric
- Modeling Approach
- Modeling Reliable Services
- Modeling Reliable Actors
- Modeling Hosting
- Testing
- Appendix A. Introduction to Service Orientation
- A Brief History of Software Engineering
- Object Orientation
- Component Orientation
- Service Orientation
- Benefits of Service Orientation
- Service-Oriented Applications
- Tenets and Principles
- Practical Principles
- Optional Principles
- What's Next?
- A Service-Oriented Platform
- Appendix B. Headers and Contexts
- Message Headers
- Client-Side Header Interaction
- Service-Side Header Interaction
- Encapsulating the Headers
- Streamlining the Client
- Context Bindings
- Client-Side Context Binding Interaction
- Service-Side Context Binding Interaction
- Streamlining the Client
- Streamlining the Service
- Creating a Custom Context Binding
- Appendix C. Discovery
- Address Discovery
- Service Configuration
- Client-Side Steps
- Scopes
- Streamlining Discovery
- Ongoing Discovery
- Announcements
- Announcing Endpoints
- Receiving Announcements
- Streamlining Announcements
- TCP-Based Discovery
- The Discovery Proxy Pattern
- Solution Architecture
- TCP Discovery Contracts
- The Discovery Service
- The Discovery Service Host
- Discoverable Services
- Discovery Client
- TCP-Based Announcements
- TCP Announcements Contracts
- Discovery Service
- The Discovery Service Host
- Announcing Services
- Announcements Client
- Appendix D. Publish-Subscribe Service
- The Publish-Subscribe Design Pattern
- Subscriber Types
- The Publish-Subscribe Framework
- Managing Transient Subscriptions
- Managing Persistent Subscribers
- Event Publishing
- Administering Persistent Subscribers
- Queued Publishers and Subscribers
- Publish-Subscribe with Discovery
- The DiscoveryPublishService&T& Class
- The Publisher
- The Subscriber
- More on DiscoveryPublishService&T&
- Appendix E. Generic Interceptor
- Intercepting Service Operations
- The Generic Invoker
- Installing the Interceptor
- Intercepting Client Calls
- The Trace Interceptors
- Identity Stack Propagation
- Security Call Stack Interceptor
- Appendix F. WCF Coding Standard
- General Design Guidelines
- Essentials
- Configuration
- Addressing
- Service Contracts
- Data Contracts
- Instance Management
- Operations and Calls
- Faults
- Transactions
- Concurrency Management
- Queued Services
- Security
- Appendix G. ServiceModelEx Catalog
- CollectionExtensions
- Category
- Description
- See Also
- ArrayExtensions
- Category
- Description
- See Also
- InProcFactory&S,I&
- Category
- Description
- See Also
- WcfWrapper&S,I&
- Category
- Description
- See Also
- ServiceHost&T&
- Category
- Description
- See Also
- MetadataHelper
- Category
- Description
- DataContractSerializer&T&
- Category
- Description
- GenericResolver, GenericResolverBehaviorAttribute, GenericResolverInstaller
- Category
- Description
- See Also
- ServiceThrottleHelper
- Category
- Description
- IInstanceStore&ID,T&
- Category
- Description
- See Also
- FileInstanceStore&ID,T&, FilePersistenceProvider, FilePersistenceProviderFactory
- Category
- Description
- See Also
- MemoryProvider, MemoryProviderFactory
- Category
- Description
- See Also
- TransactionalMemoryStore&ID,T&, TransactionalMemoryProvider, TransactionalMemoryProviderFactory
- Category
- Description
- See Also
- TransactionalInstanceStore&ID,T&, TransactionalInstanceProvider, TransactionalInstanceProviderFactory
- Category
- Description
- See Also
- InstanceContext&T&, DuplexClientBase&T,C&, DuplexChannelFactory&T,C&
- Category
- Description
- See Also
- DebugHelper
- Category
- Description
- ErrorHandlerHelper
- Category
- Description
- See Also
- ErrorHandlerBehaviorAttribute, CallbackErrorHandlerBehaviorAttribute
- Category
- Description
- See Also
- ILogbookManager, LogbookManagerClient, LogbookManager
- Category
- Description
- See Also
- BindingRequirementAttribute
- Category
- Description
- ResourceManager, TransactionalLock
- Category
- Description
- See Also
- Transactional&T&
- Category
- Description
- See Also
- TransactionalCollection&C,T&
- Category
- Description
- See Also
- TransactionalArray&T&, TransactionalDictionary&K,T&, TransactionalLinkedList&T&, TransactionalList&T&, TransactionalQueue&T&, TransactionalSortedDictionary&K,T&, TransactionalSortedList&K,T&, TransactionalStack&T&
- Category
- Description
- See Also
- TransactionalBehaviorAttribute
- Category
- Description
- See Also
- OneWayClientBaseAsync&T&
- Category
- Description
- FormHost&F&
- Category
- Description
- SafeButton, SafeLabel, SafeListBox, SafeProgressBar, SafeStatusBar, SafeTextBox, SafeTrackBar
- Category
- Description
- See Also
- ThreadPoolSynchronizer, ThreadPoolBehaviorAttribute, CallbackThreadPoolBehaviorAttribute, ThreadPoolHelper
- Category
- Description
- See Also
- AffinitySynchronizer, ThreadAffinityBehaviorAttribute, CallbackThreadAffinityBehaviorAttribute, HostThreadAffinity
- Category
- Description
- See Also
- PrioritySynchronizer, PriorityClientBase&T&, PriorityContext, PriorityCallsBehaviorAttribute
- Category
- Description
- See Also
- AsyncContextSynchronizer, AsyncContextBehaviorAttribute, HostAsyncContextExtensions
- Category
- Description
- See Also
- QueuedServiceHelper
- Category
- Description
- See Also
- ClientResponseBase&T&, ServiceResponseBase&T&, ResponseContext
- Category
- Description
- See Also
- CredentialsManager, AspNetSqlProviderService
- Category
- Description
- See Also
- SecureClientBase&T&, SecureDuplexClientBase&T,C&, SecurityBehaviorAttribute, SecurityHelper, ServiceSecurity
- Category
- Description
- See Also
- HeaderClientBase&T,H&, HeaderChannelFactory&T,H&, GenericContext&T&
- Category
- Description
- See Also
- ContextClientBase&T&, ContextManager
- Category
- Description
- See Also
- NetNamedPipeContextBinding, NetNamedPipeContextBindingElement, NetNamedPipeContextBindingCollectionElement
- Category
- Description
- See Also
- AsyncContext, AsyncContextScope
- Category
- Description
- See Also
- DiscoveryHelper
- Category
- Description
- See Also
- DiscoveryFactory
- Category
- Description
- See Also
- AddressesContainer&T&
- Category
- Description
- See Also
- AnnouncementSink&T&
- Category
- Description
- See Also
- DiscoveredServices&T&
- Category
- Description
- See Also
- IDiscovery, IDiscoveryCallback, IAnnouncements, DiscoveryService, DiscoveryFactory, DuplexDiscoveryClient, IDiscoverySubscription, IAnnouncementsSubscription, DuplexAnnouncementSink&T&
- Category
- Description
- See Also
- PersistentSubscriptionServiceClient, IPersistentSubscriptionService, ISubscriptionService, PersistentSubscription, PublishService&T&, SubscriptionManager&T&, PersistentSubscriptionManager
- Category
- Description
- See Also
- DiscoveryPublishService&T&
- Category
- Description
- See Also
- GenericInvoker, OperationInterceptorBehaviorAttribute, ServiceInterceptorBehaviorAttribute
- Category
- Description
- See Also
- InterceptorClientBase&T&, InterceptorChannelFactory&T&
- Category
- Description
- See Also
- SecurityCallFrame, SecurityCallStack, SecurityCallStackContext, SecurityCallStackClientBase&T&, SecurityCallStackInterceptor, OperationSecurityCallStackAttribute, SecurityCallStackBehaviorAttribute
- Category
- Description
- See Also
- FabricRuntime, ActorRegistration
- Category
- Description
- See Also
- ApplicationManifestAttribute
- Category
- Description
- See Also
- ServiceTestBase
- Category
- Description
- See Also
- IActor, ActorId, ActorBase, Actor, Actor&S&, ActorProxy, ActorGarbageCollectionAttribute, ReadonlyAttribute, CompletesActorInstanceAttribute, VolatileActorStateProviderAttribute, KvsActorStateProviderAttribute, ReliableDictionaryActorStateProviderAttribute
- Category
- Description
- See Also
- IService, StatelessServiceBase, ServiceProxy, ServicePartitionClient, WcfCommunicationClient&T&, WcfCommunicationClientFactory&T&, ServiceFabricClientBase&T&, ServicePartitionResolver
- Category
- Description
- See Also
- Index
- About the Authors
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.