ChannelFactory provides a raw programming interface for building a WCF client. Likewise, there are also corresponding components at the Channel level for building a WCF service. Though the Channel level-based service might not look as comprehensible and convenient as those built via
ServiceHost, it is no less powerful than the former. It is quite simple and straightforward and clearly shows how the WCF service and endpoint actually work under the hood (at Channel level).
In this recipe, we will use a simple HTTP service that receives and returns text data to demonstrate how we can use a
ChannelListener to build a raw WCF service: