using (ServiceHost serviceHost = new ServiceHost(typeof(WcfServiceLibrary1.TestService))) { // Open the ServiceHost to start listening for messages. serviceHost.Open(); // The service can now be accessed. Console.WriteLine("The service is ready."); Console.WriteLine("Pressto terminate service."); Console.ReadLine(); // Close the ServiceHost. serviceHost.Close(); }
No comments:
Post a Comment