Hi,
I created a self hosting in my console application, When i can able to start the service but am unable to cunsume the Service method. My Code is as below
In my Console application i created a instance and host the service as below
using (ServiceHost consoleHost = new
ServiceHost(typeof(WCFService1)))
{
consoleHost.Open();
Console.WriteLine("press any key to stop service host...");
Console.ReadLine();
Console.ReadLine();
consoleHost.Close();
Console.WriteLine("Service Stoped");
Console.ReadLine();
}
My Service method is as below
public class WCFService1 : IWCFService1
{
public string DoWork()
{
return "Hello from WCF Service";
}
}
Now i want to call this DoWork() method in my console application how can i call this method