using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel;
namespace EmployeeServiceHost
{
class Program
{
static void Main()
{
using (ServiceHost host = new ServiceHost(typeof(EmployeeServices.EmployeeService)))
{
try
{
host.Open();
Console.WriteLine("SERVER STARTED @: " + DateTime.Now.ToString());
Console.ReadLine();
}
catch(Exception er)
{
Console.WriteLine(er.ToString());
}
finally
{
host.Close();
}
}
}
}
}
and my app.config file
error i m getting is
An unhandled exception of type 'System.ServiceModel.CommunicationObjectFaultedException' occurred in System.ServiceModel.dll
Additional information: The communication object, System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state.
thanks in advance
Lakshmanan Sethu SankaranarayanPosted Mar 26, 2014, 3:35 AM