The WCF service is now hosted within WCF Service Host. You may still remember in the last chapter we had to start the WCF Service Host before we ran our test client. Not only do you have to start the WCF Service Host, you also have to start the WCF Test client and leave it open. This is not that nice. In addition, we will add another service later in this chapter to test distributed transaction support with two databases and it is not that easy to host two services with one WCF Service Host. So, in this section, we will first decouple our WCF service from Visual Studio to host it in IIS.
As we did in the previous chapter, you can follow these steps to host this WCF service in IIS: