O'Reilly logo

Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications by Steven Cheng

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a custom ServiceHost

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.

How to do 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required