When building WCF services you'll eventually need to integrate common logic
that may be applied across a number of services, contracts, endpoints, or
operations. Examples include logging, security, error handling, and message
or parameter manipulation. Since this kind of logic cuts across all of these
concerns and must often be executed somewhere between the submission of a
message from a client to the service, we are presented with an interesting
design and programming challenge. Fortunately, WCF provides a feature called
Custom Behaviors that lets us inject common and "cross-cutting" logic into
the WCF runtime either at the proxy (i.e., the client) or dispatcher (i.e.,
the service) to achieve such ends.
The WCF Architecture for Extensibility
The WCF architecture is amazingly extensible. Figure 1 provides an overview
that we can use to orient ourselves before delvin... (more)