Using ServiceHost and ChannelFactory
ServiceHost gives you access to the WCF hosting infrastructure on the server side whereas ChannelFactory gives you access to the WCF hosting infrastructure on the client side. The following sections cover the basics of ServiceHost and ChannelFactory from a programming model perspective.
In Chapter 4, you will learn about hosting web services in IIS. Chapter 5 covers the complete WCF hosting infrastructure and shows you the different options WCF offers in terms of hosting services in different types of applications and using services in different types of clients. In this chapter, we cover only self-hosting and console applications.
ServiceHost is instantiated based on a particular service type ...