I have a working console application where all the adresses and configuration are in a config file. But when I try to move this code to a WCF Service Application i get all kinds of errors.
class Program
{
static void Main(string[] args)
{
WebServiceHost host = new WebServiceHost(typeof(ImageService));
host.Open();
Console.WriteLine("Service up");
Console.ReadLine();
host.Close();
}
}
The problem is that the WCF service application starts automatically and has no main method, like the console app. How do I define the WCF service to start a WebServiceHost when no main method exists?