Another way to host a WCF service is in an IIS (Internet Information Services). It requires a physical file with a .svc extension to host the service properly. Unlike the previous recipe, you won't need to write any code to create the instance of ServiceHost. IIS automatically creates it for you while hosting the service.
In this recipe, we will learn how to publish an already created service to host inside the IIS server of Windows.