using System; using System.ServiceModel; using TestServiceInterface; namespace myWcfService { public class myService : ImyService { public string GetData(int value) { return string.Format("C#: You entered: {0}", value); } } public class mySvc { public static void Main() { ServiceHost sh = new ServiceHost( typeof(myService), new Uri("http://localhost:9000/myWcfService")); sh.AddServiceEndpoint( typeof(ImyService), new BasicHttpBinding(), ""); sh.Open(); Console.WriteLine("Press to terminate\n"); Console.ReadLine(); sh.Close(); } } }