El objetivo de este articulo es mostrar una forma de generar el servicio y de una forma en particular publicarlo.
Primero que todo debemos abrir Visual Studio y creamos un proyecto con la plantilla de WCF Sevice Application.

Una vez creado el proyecto podemos darnos cuenta que Visual Studio creó un proyecto en el que agrego unas referencias System.ServiceModel, un archivo de configuración web.config en el que agrega la siguiente información:
<system.serviceModel>
<services>
<service name="WCFExample.Service1" behaviorConfiguration="WCFExample.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="WCFExample.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFExample.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
En el que se especifica las propiedades del servicio de WCF.
Adicionalmente Visual Studio crea una interface y una clase que la implementa usada con contrato para ser expuesta en el servicio .

Para entender más claramente podemos modificar la interface y la clase de la siguiente forma:
IService1.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace WCFExample
{
[ServiceContract]
public interface IService1
{
[OperationContract]
string HelloWCF(string nombre);
}
}
Y la clase de la siguiente forma:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace WCFExample
{
public class Service1 : IService1
{
public string HelloWCF(string nombre)
{
return string.Format("Hola {0} esto es un ejemplo de WCF", nombre);
}
}
}
De esta forma hemos definido el servicio, ahora lo publicacmos y para esto creamos una servicio de windows

Y agregamos referencia a proyecto anterior.

Y en el archivo Service1.cs agregamos código para que el método OnStart quede de la siguiente forma.
protected override void OnStart(string[] args)
{
using (ServiceHost host = new ServiceHost(typeof(WCFExample.Service1)))
{
host.Open();
//El servicio esta abierto
}
}
De esta forma al iniciar el servcivio estara disponible desde la maquina en que se ejecuta el servicio.