using System; using System.ServiceModel; public class HostingWCF { public static void Main() { BasicHttpBinding binding = new BasicHttpBinding(); Uri address = new Uri ( "http://127.0.0.1:9000" ) ; ServiceHost host = new ServiceHost ( typeof(EMIService) , address ); host.AddServiceEndpoint ( typeof(IEMICalculator), binding, "EMIService" ); host.Open(); Console.WriteLine("Service Is Started (press a key to stop)..."); Console.ReadKey(); host.Close(); } }