WCF provides a powerful and flexible configuration system that allows service developers or server administrators to configure service endpoints or hosting behaviors, either programmatically or declaratively (in
app.config file). However, sometimes it is useful and important to find a proper means to configure a large amount of services in a common manner instead of manipulating each service individually. In such cases, a quite straightforward way is to create a custom
ServiceHost and make all our service hosted with it.
In this recipe, we will use a
DebugServiceHost (which ensures that
IncludeExceptionDetails is enabled) sample to demonstrate how we can create a custom
ServiceHost and use it to extend ...