ServiceHost selfHost = null; Uri baseAddress = new Uri(http://localhost:8888/Microsoft.ServiceModel.Samples/CalculatorService); selfHost= new ServiceHost(typeof(CalculatorService), baseAddress); selfHost.AddServiceEndpoint(typeof(ICalculator),new WSHttpBinding(),CalculatorService); ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; selfHost.Description.Behaviors.Add(smb); selfHost.Open(); Console.WriteLine("The service is ready"); Console.ReadKey();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)