■
Source Code
The MagicEightBallServiceLib project is located under the Chapter 25 subdirectory.
Hosting the WCF Service
We are now ready to define a host. Although a production-level service would be hosted from a
Windows service or an IIS virtual directory, our first host will be a simple console named
MagicEightBallServiceHost.
Once you have created this new Console Application project, add a reference to the System.
ServiceModel.dll and MagicEightBallServiceLib.dll assemblies, and update your initial code file
by importing the System.ServiceModel and MagicEightBallServiceLib namespaces:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Do'stlaringiz bilan baham: |