Custom Bindings

Standard bindings were designed to simplify how developers configure services, providing a predefined set of binding elements with the ability to customize settings for the most common features. Standard bindings will satisfy the most common cases, but at times you need more control over the channel stack, for example:

  • When none of the standard bindings provide the combination of features required

  • When you want to use features not exposed by standard bindings

For these situations you must create a CustomBinding and select the binding elements and related settings you require. The key is to configure the binding elements in the correct order and with settings that don’t conflict with one another. The possible combinations with a CustomBinding may seem overwhelming, a problem that standard bindings solve by providing a reduced set of features with which to work.

In this section, I’ll take you on a tour through the binding elements available to a CustomBinding and provide some examples. In later chapters, you’ll see more uses of CustomBinding as I explore some specific scenarios that require it.

CustomBinding Features

When you work with a CustomBinding, you have access to all of the same binding elements each of the standard bindings support and more. There are some extended settings for each binding element that are not available from the standard bindings for simplicity’s sake, and there are additional binding elements that are not available unless you create a ...

Get Learning WCF now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.