Programming WCF Services

Book description

Written by Microsoft software legend Juval Lowy, Programming WCF Services is the authoritative introduction to Microsoft's new, and some say revolutionary, unified platform for developing service-oriented applications (SOA) on Windows. Relentlessly practical, the book delivers insight, not documentation, to teach developers what they need to know to build the next generation of SOAs.



After explaining the advantages of service-orientation for application design and teaching the basics of how to develop SOAs using WCF, the book shows how you can take advantage of built-in features such as service hosting, instance management, asynchronous calls, synchronization, reliability, transaction management, disconnected queued calls and security to build best in class applications. Programming WCF Services focuses on the rationale behind particular design decisions, often shedding light on poorly-documented and little-understood aspects of SOA development. Developers and architects will learn not only the "how" of WCF programming, but also relevant design guidelines, best practices, and pitfalls. Original techniques and utilities provided by the author throughout the book go well beyond anything that can be found in conventional sources.



Based on experience and insight gained while taking part in the strategic design of WCF and working with the team that implemented it, Programming WCF Services provides experienced working professionals with the definitive work on WCF. Not only will this book make you a WCF expert, it will make you a better software engineer. It's the Rosetta Stone of WCF.

Publisher resources

View/Submit Errata

Table of contents

  1. Programming WCF Services
  2. Dedication
  3. A Note Regarding Supplemental Files
  4. Foreword
  5. Preface
    1. How This Book Is Organized
    2. Some Assumptions About the Reader
    3. What You Need to Use This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. How to Contact Us
    7. Safari® Enabled
    8. Acknowledgments
  6. 1. WCF Essentials
    1. 1.1. What Is WCF?
    2. 1.2. Services
      1. 1.2.1. Services’ Execution Boundaries
        1. 1.2.1.1. WCF and location transparency
    3. 1.3. Addresses
      1. 1.3.1. TCP Addresses
      2. 1.3.2. HTTP Addresses
      3. 1.3.3. IPC Addresses
      4. 1.3.4. MSMQ Addresses
      5. 1.3.5. Peer Network Address
    4. 1.4. Contracts
      1. 1.4.1. The Service Contract
        1. 1.4.1.1. Applying the ServiceContract attribute
        2. 1.4.1.2. Names and namespaces
    5. 1.5. Hosting
      1. 1.5.1. IIS Hosting
        1. 1.5.1.1. Using Visual Studio 2005
        2. 1.5.1.2. The Web.Config file
      2. 1.5.2. Self-Hosting
        1. 1.5.2.1. Using Visual Studio 2005
        2. 1.5.2.2. Self-hosting and base addresses
        3. 1.5.2.3. Advanced hosting features
        4. 1.5.2.4. The ServiceHost<T> class
      3. 1.5.3. WAS Hosting
    6. 1.6. Bindings
      1. 1.6.1. The Standard Bindings
      2. 1.6.2. Format and Encoding
      3. 1.6.3. Choosing a Binding
      4. 1.6.4. Using a Binding
    7. 1.7. Endpoints
      1. 1.7.1. Administrative Endpoint Configuration
        1. 1.7.1.1. Using base addresses
        2. 1.7.1.2. Binding configuration
      2. 1.7.2. Programmatic Endpoint Configuration
        1. 1.7.2.1. Binding configuration
    8. 1.8. Metadata Exchange
      1. 1.8.1. Enabling Metadata Exchange Programmatically
      2. 1.8.2. The Metadata Exchange Endpoint
        1. 1.8.2.1. Adding MEX endpoints programmatically
        2. 1.8.2.2. Streamlining with ServiceHost<T>
      3. 1.8.3. The Metadata Explorer
    9. 1.9. Client-Side Programming
      1. 1.9.1. Generating the Proxy
      2. 1.9.2. Administrative Client Configuration
        1. 1.9.2.1. Binding configuration
        2. 1.9.2.2. Generating the client config file
        3. 1.9.2.3. In-proc configuration
        4. 1.9.2.4. The SvcConfigEditor
      3. 1.9.3. Creating and Using the Proxy
        1. 1.9.3.1. Closing the proxy
        2. 1.9.3.2. Call timeout
      4. 1.9.4. Programmatic Client Configuration
    10. 1.10. Programmatic Versus Administrative Configuration
    11. 1.11. WCF Architecture
      1. 1.11.1. Host Architecture
    12. 1.12. Working with Channels
      1. 1.12.1. The InProcFactory Class
        1. 1.12.1.1. Implementing InProcFactory<T>
    13. 1.13. Reliability
      1. 1.13.1. Binding and Reliability
      2. 1.13.2. Ordered Messages
      3. 1.13.3. Configuring Reliability
      4. 1.13.4. Requiring Ordered Delivery
  7. 2. Service Contracts
    1. 2.1. Operation Overloading
    2. 2.2. Contract Inheritance
      1. 2.2.1. Client-Side Contract Hierarchy
        1. 2.2.1.1. Restoring the hierarchy on the client
    3. 2.3. Service Contracts Factoring and Design
      1. 2.3.1. Contract Factoring
      2. 2.3.2. Factoring Metrics
    4. 2.4. Contract Queries
      1. 2.4.1. Programmatic Metadata Processing
      2. 2.4.2. The MetadataHelper Class
  8. 3. Data Contracts
    1. 3.1. Serialization
      1. 3.1.1. .NET Serialization
        1. 3.1.1.1. The Serializable attribute
        2. 3.1.1.2. The .NET formatters
      2. 3.1.2. The WCF Formatters
      3. 3.1.3. Data Contract via Serialization
    2. 3.2. Data Contract Attributes
      1. 3.2.1. Importing a Data Contract
      2. 3.2.2. Data Contract and the Serializable Attribute
      3. 3.2.3. Composite Data Contracts
      4. 3.2.4. Data Contract Events
        1. 3.2.4.1. Using the deserializing event
        2. 3.2.4.2. Using the deserialized event
    3. 3.3. Data Contract Hierarchy
      1. 3.3.1. Known Types
      2. 3.3.2. Service Known Types
      3. 3.3.3. Multiple Known Types
      4. 3.3.4. Configuring Known Types
      5. 3.3.5. Object and Interfaces
    4. 3.4. Data Contract Equivalence
      1. 3.4.1. Serialization Order
    5. 3.5. Versioning
      1. 3.5.1. New Members
      2. 3.5.2. Missing Members
        1. 3.5.2.1. Using the OnDeserializing event
        2. 3.5.2.2. Required members
      3. 3.5.3. Versioning Round-Trip
        1. 3.5.3.1. Schema compatibility
    6. 3.6. Enumerations
    7. 3.7. Delegates and Data Contracts
    8. 3.8. Data Sets and Tables
      1. 3.8.1. Arrays Instead of Tables
    9. 3.9. Generics
    10. 3.10. Collections
      1. 3.10.1. Concrete Collections
      2. 3.10.2. Custom Collections
      3. 3.10.3. Collection Data Contract
      4. 3.10.4. Referencing the Collection
      5. 3.10.5. Client-Side Collection
      6. 3.10.6. C# Iterators
      7. 3.10.7. Dictionaries
  9. 4. Instance Management
    1. 4.1. Behaviors
    2. 4.2. Per-Call Services
      1. 4.2.1. Benefits of Per-Call Services
      2. 4.2.2. Configuring Per-Call Services
      3. 4.2.3. Designing Per-Call Services
        1. 4.2.3.1. Per-call and performance
        2. 4.2.3.2. Cleanup operations
      4. 4.2.4. Choosing Per-Call Services
    3. 4.3. Per-Session Services
      1. 4.3.1. Configuring Private Sessions
        1. 4.3.1.1. SessionMode.Allowed
        2. 4.3.1.2. SessionMode.Required
        3. 4.3.1.3. SessionMode.NotAllowed
        4. 4.3.1.4. Binding, contract, and service behavior
        5. 4.3.1.5. Consistent configuration
      2. 4.3.2. Sessions and Reliability
      3. 4.3.3. Session ID
      4. 4.3.4. Session Termination
    4. 4.4. Singleton Service
      1. 4.4.1. Initializing a Singleton
        1. 4.4.1.1. Streamlining with ServiceHost<T>
      2. 4.4.2. Choosing a Singleton
    5. 4.5. Demarcating Operations
    6. 4.6. Instance Deactivation
      1. 4.6.1. Configuring with ReleaseInstanceMode.None
      2. 4.6.2. Configuring with ReleaseInstanceMode.BeforeCall
      3. 4.6.3. Configuring with ReleaseInstanceMode.AfterCall
      4. 4.6.4. Configuring with ReleaseInstanceMode.BeforeAndAfterCall
      5. 4.6.5. Explicit Deactivation
      6. 4.6.6. Using Instance Deactivation
    7. 4.7. Throttling
      1. 4.7.1. Configuring Throttling
        1. 4.7.1.1. Administrative throttling
        2. 4.7.1.2. Programmatic throttling
        3. 4.7.1.3. Streamlining with ServiceHost<T>
        4. 4.7.1.4. Reading throttled values
      2. 4.7.2. Throttled Connections in the Binding
  10. 5. Operations
    1. 5.1. Request-Reply Operations
    2. 5.2. One-Way Operations
      1. 5.2.1. Configuring One-Way Operations
      2. 5.2.2. One-Way Operations and Reliability
      3. 5.2.3. One-Way Operations and Sessionful Services
      4. 5.2.4. One-Way Operations and Exceptions
        1. 5.2.4.1. Per-call services and one-way exceptions
        2. 5.2.4.2. Sessionful services and one-way exceptions
    3. 5.3. Callback Operations
      1. 5.3.1. Callback Contract
      2. 5.3.2. Client Callback Setup
        1. 5.3.2.1. Duplex proxy
      3. 5.3.3. Service-Side Callback Invocation
        1. 5.3.3.1. Callback reentrancy
      4. 5.3.4. Callback Connection Management
        1. 5.3.4.1. Connection management and instance mode
      5. 5.3.5. Duplex Proxy and Type Safety
      6. 5.3.6. Duplex Factory
      7. 5.3.7. Callback Contract Hierarchy
      8. 5.3.8. Callback, Ports, and Channels
        1. 5.3.8.1. Assigning a callback address
        2. 5.3.8.2. Assigning callback address declaratively
    4. 5.4. Events
    5. 5.5. Streaming
      1. 5.5.1. I/O Streams
      2. 5.5.2. Streaming and Binding
      3. 5.5.3. Streaming and Transport
      4. 5.5.4. Stream Management
  11. 6. Faults
    1. 6.1. Errors and Exceptions
      1. 6.1.1. Exceptions and Instance Management
        1. 6.1.1.1. Per-call service and exceptions
        2. 6.1.1.2. Sessionful service and exceptions
        3. 6.1.1.3. Singleton service and exceptions
      2. 6.1.2. Faults
    2. 6.2. Fault Contracts
      1. 6.2.1. Fault Handling
      2. 6.2.2. Unknown Faults
      3. 6.2.3. Fault Debugging
        1. 6.2.3.1. Declarative exceptions inclusion
        2. 6.2.3.2. Host and exceptions diagnostics
      4. 6.2.4. Faults and Callbacks
        1. 6.2.4.1. Callbacks debugging
    3. 6.3. Error-Handling Extensions
      1. 6.3.1. Providing a Fault
        1. 6.3.1.1. Using ProvideFault( )
        2. 6.3.1.2. Exception promotion
      2. 6.3.2. Handling a Fault
        1. 6.3.2.1. The Logbook service
      3. 6.3.3. Installing Error-Handling Extensions
        1. 6.3.3.1. Error-Handling attribute
      4. 6.3.4. Host and Error Extensions
      5. 6.3.5. Callbacks and Error Extensions
        1. 6.3.5.1. Callback error-handling attribute
  12. 7. Transactions
    1. 7.1. The Recovery Challenge
    2. 7.2. Transactions
      1. 7.2.1. Transactional Resources
      2. 7.2.2. Transaction Properties
        1. 7.2.2.1. The Atomic property
        2. 7.2.2.2. The Consistent property
        3. 7.2.2.3. The Isolated property
        4. 7.2.2.4. The Durable property
      3. 7.2.3. Transaction Management
        1. 7.2.3.1. The transaction management challenge
        2. 7.2.3.2. Distributed transactions
        3. 7.2.3.3. The two-phase commit protocol
      4. 7.2.4. WCF Resource Managers
    3. 7.3. Transaction Propagation
      1. 7.3.1. Transaction Flow and Binding
      2. 7.3.2. Transaction Flow and Operation Contract
        1. 7.3.2.1. TransactionFlowOption.NotAllowed
        2. 7.3.2.2. TransactionFlowOption.Allowed
        3. 7.3.2.3. TransactionFlowOption.Mandatory
      3. 7.3.3. One-Way Calls
    4. 7.4. Transaction Protocols and Managers
      1. 7.4.1. Protocols and Bindings
      2. 7.4.2. Transaction Managers
        1. 7.4.2.1. The LTM
        2. 7.4.2.2. The KTM
        3. 7.4.2.3. The DTC
      3. 7.4.3. Transaction Manager Promotion
        1. 7.4.3.1. LTM promotion
        2. 7.4.3.2. KTM promotion
        3. 7.4.3.3. Resources and promotion
    5. 7.5. The Transaction Class
      1. 7.5.1. The Ambient Transaction
      2. 7.5.2. Local Versus Distributed Transaction
        1. 7.5.2.1. Local transaction identifier
        2. 7.5.2.2. Distributed transaction identifier
    6. 7.6. Transactional Service Programming
      1. 7.6.1. Ambient Transaction Setting
      2. 7.6.2. Transaction Propagation Modes
        1. 7.6.2.1. Client/Service transaction
        2. 7.6.2.2. Requiring transaction flow
        3. 7.6.2.3. Client transaction
        4. 7.6.2.4. Service transaction
        5. 7.6.2.5. None transaction
        6. 7.6.2.6. Choosing a service transaction mode
      3. 7.6.3. Voting and Completion
        1. 7.6.3.1. Declarative voting
        2. 7.6.3.2. Explicit voting
        3. 7.6.3.3. Terminating a transaction
      4. 7.6.4. Transaction Isolation
        1. 7.6.4.1. Isolation and transaction flow
      5. 7.6.5. Transaction Timeout
        1. 7.6.5.1. Transaction flow and timeout
    7. 7.7. Explicit Transaction Programming
      1. 7.7.1. The TransactionScope Class
        1. 7.7.1.1. TransactionScope voting
      2. 7.7.2. Transaction Flow Management
        1. 7.7.2.1. Voting inside a nested scope
        2. 7.7.2.2. TransactionScopeOption.Required
        3. 7.7.2.3. TransactionScopeOption.RequiresNew
        4. 7.7.2.4. TransactionScopeOption.Suppress
        5. 7.7.2.5. TransactionScope timeout
        6. 7.7.2.6. TransactionScope isolation level
      3. 7.7.3. Nonservice Clients
    8. 7.8. Service State Management
      1. 7.8.1. Transaction Boundary
      2. 7.8.2. State Identifier
    9. 7.9. Instance Management and Transactions
      1. 7.9.1. Per-Call Transactional Service
        1. 7.9.1.1. Transaction life cycle
      2. 7.9.2. Per-Session Transactional Service
        1. 7.9.2.1. Releasing service instance
        2. 7.9.2.2. Disabling releasing the service instance
        3. 7.9.2.3. State-aware per-session service
        4. 7.9.2.4. Stateful per-session service
        5. 7.9.2.5. Transaction life cycle
        6. 7.9.2.6. Concurrent transactions
        7. 7.9.2.7. Completing on session end
        8. 7.9.2.8. Transactional affinity
        9. 7.9.2.9. Hybrid state management
        10. 7.9.2.10. Choosing per-session transactional service
      3. 7.9.3. Transactional Singleton
        1. 7.9.3.1. Stateful singleton
      4. 7.9.4. Instancing Modes and Transactions
    10. 7.10. Callbacks
      1. 7.10.1. Callback Transaction Modes
        1. 7.10.1.1. Isolation and timeouts
      2. 7.10.2. Callback Voting
      3. 7.10.3. Using Transactional Callbacks
        1. 7.10.3.1. Out-of-band transactional callbacks
        2. 7.10.3.2. Service transactional callback
  13. 8. Concurrency Management
    1. 8.1. Instance Management and Concurrency
    2. 8.2. Service Concurrency Mode
      1. 8.2.1. ConcurrencyMode.Single
        1. 8.2.1.1. Synchronized access and transactions
      2. 8.2.2. ConcurrencyMode.Multiple
        1. 8.2.2.1. Unsynchronized access and transactions
      3. 8.2.3. ConcurrencyMode.Reentrant
        1. 8.2.3.1. Designing for reentrancy
        2. 8.2.3.2. Reentrancy and transactions
        3. 8.2.3.3. Callbacks and reentrancy
    3. 8.3. Instances and Concurrent Access
      1. 8.3.1. Per-Call Services
      2. 8.3.2. Sessionful and Singleton Services
    4. 8.4. Resources and Services
      1. 8.4.1. Deadlocked Access
      2. 8.4.2. Deadlocked Avoidance
    5. 8.5. Resource Synchronization Context
      1. 8.5.1. .NET 2.0 Synchronization Contexts
        1. 8.5.1.1. The SynchronizationContext class
        2. 8.5.1.2. Working with the synchronization context
      2. 8.5.2. UI Synchronization Context
        1. 8.5.2.1. UI access and updates
        2. 8.5.2.2. Safe controls
    6. 8.6. Service Synchronization Context
      1. 8.6.1. Hosting on the UI Thread
        1. 8.6.1.1. Accessing the form
        2. 8.6.1.2. Multiple UI threads
      2. 8.6.2. Form As a Service
        1. 8.6.2.1. The FormHost<F> class
      3. 8.6.3. UI Thread and Concurrency Management
        1. 8.6.3.1. UI responsiveness
        2. 8.6.3.2. UI thread and concurrency modes
    7. 8.7. Custom Service Synchronization Context
      1. 8.7.1. Thread-Affinity Services
      2. 8.7.2. Installing a Service Synchronization Context
        1. 8.7.2.1. The ThreadAffinityBehavior attribute
    8. 8.8. Callbacks and Client Safety
      1. 8.8.1. Callbacks with ConcurrencyMode.Single
      2. 8.8.2. Callbacks with ConcurrencyMode.Multiple
      3. 8.8.3. Callbacks with ConcurrencyMode.Reentrant
    9. 8.9. Callbacks and Synchronization Context
      1. 8.9.1. Callbacks and UI Synchronization Context
        1. 8.9.1.1. UI thread callbacks and responsiveness
        2. 8.9.1.2. UI thread callbacks and concurrency management
      2. 8.9.2. Callback Custom Synchronization Context
        1. 8.9.2.1. The CallbackThreadAffinityBehaviorAttribute
    10. 8.10. Asynchronous Calls
      1. 8.10.1. Requirements for an Asynchronous Mechanism
      2. 8.10.2. Proxy-Based Asynchronous Calls
      3. 8.10.3. Asynchronous Invocation
        1. 8.10.3.1. The IAsyncResult interface
      4. 8.10.4. Polling or Waiting for Completion
      5. 8.10.5. Completion Callbacks
        1. 8.10.5.1. Completion callback and thread safety
        2. 8.10.5.2. Passing state information
        3. 8.10.5.3. Completion callback synchronization context
      6. 8.10.6. One-Way Asynchronous Operations
      7. 8.10.7. Asynchronous Error Handling
      8. 8.10.8. Cleaning Up After End<Operation>
      9. 8.10.9. Asynchronous Calls and Transactions
      10. 8.10.10. Synchronous Versus Asynchronous Calls
  14. 9. Queued Services
    1. 9.1. Disconnected Services and Clients
    2. 9.2. Queued Calls
      1. 9.2.1. Queued Calls Architecture
      2. 9.2.2. Queued Contracts
      3. 9.2.3. Configuration and Setup
        1. 9.2.3.1. Workgroup installation and security
        2. 9.2.3.2. Creating the queue
        3. 9.2.3.3. Queue purging
        4. 9.2.3.4. Queues, services, and endpoints
        5. 9.2.3.5. Exposing metadata
    3. 9.3. Transactions
      1. 9.3.1. Delivery and Playback
        1. 9.3.1.1. Delivery transaction
        2. 9.3.1.2. Playback transaction
      2. 9.3.2. Service Transaction Configuration
        1. 9.3.2.1. Participating in playback transaction
        2. 9.3.2.2. Ignoring the playback transaction
        3. 9.3.2.3. Using a separate transaction
      3. 9.3.3. Nondurable Queues
    4. 9.4. Instance Management
      1. 9.4.1. Per-Call Queued Services
        1. 9.4.1.1. Nontransactional clients
        2. 9.4.1.2. Transactional clients
        3. 9.4.1.3. Per-call processing
      2. 9.4.2. Sessionful Queued Services
        1. 9.4.2.1. Clients and transactions
        2. 9.4.2.2. Services and transactions
      3. 9.4.3. Singleton Service
        1. 9.4.3.1. Calls and order
    5. 9.5. Concurrency Management
      1. 9.5.1. Throttling
    6. 9.6. Delivery Failures
      1. 9.6.1. The Dead-Letter Queue
      2. 9.6.2. Time to Live
      3. 9.6.3. Configuring the Dead-Letter Queue
        1. 9.6.3.1. Custom DLQ verification
      4. 9.6.4. Processing the Dead-Letter Queue
        1. 9.6.4.1. Defining the DLQ service
        2. 9.6.4.2. Failure properties
        3. 9.6.4.3. Implementing a DLQ service
    7. 9.7. Playback Failures
      1. 9.7.1. Poison Messages
      2. 9.7.2. Poison Messages Handling in MSMQ 4.0
        1. 9.7.2.1. Retry batches
        2. 9.7.2.2. ReceiveErrorHandling.Fault
        3. 9.7.2.3. ReceiveErrorHandling.Drop
        4. 9.7.2.4. ReceiveErrorHandling.Reject
        5. 9.7.2.5. ReceiveErrorHandling.Move
        6. 9.7.2.6. Configuration sample
        7. 9.7.2.7. Poison message service
      3. 9.7.3. Poison Message Handling on MSMQ 3.0
    8. 9.8. Queued Versus Connected Calls
      1. 9.8.1. Requiring Queuing
    9. 9.9. Response Service
      1. 9.9.1. Designing a Response Service Contract
        1. 9.9.1.1. Response address and method ID
        2. 9.9.1.2. Using message headers
        3. 9.9.1.3. The ResponseContext class
      2. 9.9.2. Client-Side Programming
      3. 9.9.3. Service-Side Programming
      4. 9.9.4. Response Service-Side Programming
      5. 9.9.5. Streamlining the Response Service
        1. 9.9.5.1. Streamlining the client
        2. 9.9.5.2. Streamlining the queued service
        3. 9.9.5.3. Streamlining the response service-side
      6. 9.9.6. Transactions
        1. 9.9.6.1. Using a new transaction
        2. 9.9.6.2. Response service and transactions
    10. 9.10. HTTP Bridge
      1. 9.10.1. Designing the Bridge
      2. 9.10.2. Transaction Configuration
      3. 9.10.3. Service-Side Configuration
      4. 9.10.4. Client-Side Configuration
  15. 10. Security
    1. 10.1. Authentication
    2. 10.2. Authorization
    3. 10.3. Transfer Security
      1. 10.3.1. Transfer Security Modes
        1. 10.3.1.1. None transfer security mode
        2. 10.3.1.2. Transport security
        3. 10.3.1.3. Message security
        4. 10.3.1.4. Mixed transfer security
        5. 10.3.1.5. Both transfer security
      2. 10.3.2. Transfer Security Mode Configuration
        1. 10.3.2.1. Specific bindings configuration
      3. 10.3.3. Transport Security and Credentials
      4. 10.3.4. Message Security and Credentials
    4. 10.4. Identity Management
    5. 10.5. Overall Policy
    6. 10.6. Scenario-Driven Approach
    7. 10.7. Intranet Application
      1. 10.7.1. Securing the Intranet Bindings
        1. 10.7.1.1. Transport security protection level
        2. 10.7.1.2. NetTcpBinding configuration
        3. 10.7.1.3. NetNamedPipeBinding configuration
        4. 10.7.1.4. NetMsmqBinding configuration
      2. 10.7.2. Message Protection
      3. 10.7.3. Authentication
        1. 10.7.3.1. Providing alternative Windows credentials
      4. 10.7.4. Identities
        1. 10.7.4.1. The IIdentity interface
        2. 10.7.4.2. Working with WindowsIdentity
      5. 10.7.5. The Security Call Context
      6. 10.7.6. Impersonation
        1. 10.7.6.1. Manual impersonation
        2. 10.7.6.2. Declarative impersonation
        3. 10.7.6.3. Impersonating all operations
        4. 10.7.6.4. Restricting impersonation
        5. 10.7.6.5. Using impersonation
      7. 10.7.7. Authorization
        1. 10.7.7.1. Security principal
        2. 10.7.7.2. Selecting authorization mode
        3. 10.7.7.3. Declarative role-based security
        4. 10.7.7.4. Programmatic role-based security
      8. 10.7.8. Identity Management
      9. 10.7.9. Callbacks
    8. 10.8. Internet Application
      1. 10.8.1. Securing the Internet Bindings
        1. 10.8.1.1. WSHttpBinding configuration
        2. 10.8.1.2. WSDualHttpBinding configuration
      2. 10.8.2. Message Protection
        1. 10.8.2.1. Configuring host certificate
        2. 10.8.2.2. Using the host certificate
        3. 10.8.2.3. Service certificate validation
        4. 10.8.2.4. Working with a test certificate
      3. 10.8.3. Authentication
      4. 10.8.4. Using Windows Credentials
        1. 10.8.4.1. Authorization
        2. 10.8.4.2. Identity management
      5. 10.8.5. Using the ASP.NET Providers
        1. 10.8.5.1. The credentials providers
        2. 10.8.5.2. Credentials administration
        3. 10.8.5.3. Shortcomings of Visual Studio 2005
        4. 10.8.5.4. Credentials Manager
        5. 10.8.5.5. Authentication
        6. 10.8.5.6. Authorization
        7. 10.8.5.7. Declarative role-based security
      6. 10.8.6. Identity Management
        1. 10.8.6.1. Impersonation
      7. 10.8.7. Callbacks
    9. 10.9. Business-to-Business Application
      1. 10.9.1. Securing the Business-to-Business Bindings
      2. 10.9.2. Authentication
      3. 10.9.3. Authorization
      4. 10.9.4. Identity Management
        1. 10.9.4.1. Impersonation
      5. 10.9.5. Callbacks
      6. 10.9.6. Host Security Configuration
    10. 10.10. Anonymous Application
      1. 10.10.1. Securing the Anonymous Bindings
      2. 10.10.2. Authentication
      3. 10.10.3. Authorization
      4. 10.10.4. Identity Management
        1. 10.10.4.1. Impersonation
      5. 10.10.5. Callbacks
    11. 10.11. No Security
      1. 10.11.1. Unsecuring the Bindings
      2. 10.11.2. Authentication
      3. 10.11.3. Authorization
      4. 10.11.4. Identity Management
        1. 10.11.4.1. Impersonation
      5. 10.11.5. Callbacks
    12. 10.12. Scenarios Summary
    13. 10.13. Declarative Security Framework
      1. 10.13.1. The SecurityBehaviorAttribute
        1. 10.13.1.1. Configuring intranet service
        2. 10.13.1.2. Configuring Internet service
        3. 10.13.1.3. Configuring business-to-business service
        4. 10.13.1.4. Configuring Anonymous service
        5. 10.13.1.5. Configuring No-Security service
        6. 10.13.1.6. Implementing SecurityBehaviorAttribute
      2. 10.13.2. Host and Declarative Security
      3. 10.13.3. Client-Side Declarative Security
        1. 10.13.3.1. Implementing SecurityHelper
        2. 10.13.3.2. The SecureClientBase<T> class
        3. 10.13.3.3. Secure channel factory
        4. 10.13.3.4. Duplex client and declarative security
        5. 10.13.3.5. The SecureDuplexChannelFactory<T,C> class
    14. 10.14. Security Auditing
      1. 10.14.1. Configuring Security Audits
      2. 10.14.2. Declarative Security Audit
  16. A. Introduction to Service-Orientation
    1. A.1. A Brief History of Software Engineering
      1. A.1.1. Object-Orientation
      2. A.1.2. Component-Orientation
    2. A.2. Service-Orientation
      1. A.2.1. Benefits of Service-Orientation
      2. A.2.2. Service-Oriented Applications
    3. A.3. Tenets and Principles
      1. A.3.1. Practical Principles
      2. A.3.2. Optional Principles
  17. B. Publish-Subscribe Service
    1. B.1. The Publish-Subscribe Design Pattern
      1. B.1.1. Subscriber Types
    2. B.2. The Publish-Subscribe Framework
      1. B.2.1. Managing Transient Subscriptions
      2. B.2.2. Managing Persistent Subscribers
      3. B.2.3. Event Publishing
      4. B.2.4. Administering Persistent Subscribers
      5. B.2.5. Queued Publishers and Subscribers
        1. B.2.5.1. Queued publisher
        2. B.2.5.2. Queued subscriber
  18. C. WCF Coding Standard
    1. C.1. General Design Guidelines
    2. C.2. Essentials
    3. C.3. Service Contracts
    4. C.4. Data Contracts
    5. C.5. Instance Management
    6. C.6. Operations and Calls
    7. C.7. Faults
    8. C.8. Transactions
    9. C.9. Concurrency Management
    10. C.10. Queued Services
    11. C.11. Security
  19. About the Author
  20. Colophon
  21. Copyright

Product information

  • Title: Programming WCF Services
  • Author(s): Juval Lowy
  • Release date: February 2007
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596526993