using System; using System.ServiceModel; namespace IndiHello { [ServiceContract] public class Hello { [OperationContract] public string SayHello(string name) { return "Hello " + name; } } class Program { static void Main(string[] args) { ServiceHost host = new ServiceHost(new Uri("http://localhost/hello")); host.AddEndpoint(typeof(Hello), new BasicProfileBinding(), "ep"); host.Open(); Console.WriteLine("Press ENTER to quit"); Console.ReadLine(); host.Close(); } } }