Context Channel Shapes

What channels can be used in a context binding?

The primary limitation for building a context binding is that the channel stack has to have the right shape. The context exchange protocol used by a context binding requires that the first invoked operation be a request-reply operation. This is so that the initial context can be established. In order to support a request-reply operation, the channel stack needs to support one of a particular set of shapes.

There are currently five channel shapes allowed when using a context binding:

- IRequestChannel

  • IReplyChannel
  • IReplySessionChannel
  • IDuplexSessionChannel

The request and reply channel shapes are paired for the client and server so on any particular endpoint there are three valid channel shapes.

Conditions are limited further if you want to use HTTP cookies as your context exchange mechanism rather than the default of SOAP headers. In that case it's no longer possible to use a duplex channel so you're limited to variations on the request-reply message exchange pattern.

Next time: Manual Context Management