Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By : Mike Liu
Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By: Mike Liu

Overview of this book

Table of Contents (20 chapters)
WCF Multi-layer Services Development with Entity Framework Fourth Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Hosting the HelloWorld WCF Service
Index

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>
        <add factory="System.ServiceModel.Activation.ServiceHostFactory"
          relativeAddress="./ProductService.svc"
          service="NorthwindService.ProductService"/>
      </serviceActivations>
    </serviceHostingEnvironment...