private void StartServices() { //start VS as admin! ServiceHost host = new ServiceHost(typeof(PersonProvider)); PersonProvider.InitService(MessageReceived); //host.SetEndpointAddress(new ServiceEndpoint(new ContractDescription("http")), "/http"); host.Open(); }