Friday, October 22, 2010

Making sense of WCF configuration

Created this diagram as a note to myself regarding the basics of WCF configuration.

WCF Configuration

Things to note:
The ABCs (address, binding, contract) are defined at the EndPoint level. {The address defines where the service is published, the binding defines how to connect to the service and the contract defines what the service can do}
Apart from the Service and Endpoint, none of the other elements are required. (In WCF 4, none of the elements are needed due to auto-configuration, but I still prefer defining the configuration, because of the control it provides me).
You can have multiple end-points for a given service (this allows you to provide endpoints that allow clients to connect using different protocols [bindings]).
The boxes in green, although not required, it is a good idea to define them. (ServiceBehavior defines things such as whether a WSDL document will be generated for the service and BindingConfiguration define specific behavior for each binding that is being used)
The boxes in orange are not required and should be defined only if you need specific control over the endpoint behavior

The diagram below shows how the different sections of the WCF configuration relate to each other.

WCF Configuration2

kick it on

No comments: