I am trying to host two services using a single console app. However, when I am trying to do so, only one service gets hosted, while the other does not.
Program.cs:<
You're instantly closing the first, since it's in the using. You need to set it up so the first using scope doesn't end until after the ReadLine() call.
Try:
using (ServiceHost host = new ServiceHost(typeof(WWWCF.Login)))
{
host.Open();
Console.WriteLine("Service1 Started");
using (ServiceHost host1 = new ServiceHost(typeof(WWWCF.UserRegistration)))
{
host1.Open();
Console.WriteLine("Service2 Started");
Console.ReadLine();
}
}