Hosting the WCF service in IIS

The WCF service is now hosted within the WCF Service Host. To test it with our own test client, we will have to start WCF Service Host before we run our own test client. To make things easier, in this section, we will first decouple our WCF service from Visual Studio. We will host it in IIS.

You can follow these steps to host this WCF service in IIS (refer to the Hosting the service in IIS using the HTTP protocol section in Chapter 2, Hosting the HelloWorld WCF Service).

  1. In the Solution Explorer, under the NorthwindService project, copy the App.config file to Web.config.
  2. Within the Web.config file, add the following node as a child node of the service model node, system.serviceModel:
    <serviceHostingEnvironment > <serviceActivations> ...

Get WCF Multi-layer Services Development with Entity Framework Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.