S
shakthi
Failed to stop service.
System.ServiceModel.CommunicationObjectFaultedException: The
communication object, System.ServiceModel.ServiceHost, cannot be used
for communication because it is in the Faulted state.
at HRBFA.Agent.WindowsService.AgentWindowsService.OnStop() in C:\tfs
\FA Nexus\Dev\Framework\HRBFA.Agent\HRBFA.Agent.WindowsService
\AgentWindowsService.cs:line 51
at System.ServiceProcess.ServiceBase.DeferredStop()
The OnStop() which i hav is
protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary
to stop your service.
try
{
if (serviceHost != null)
{
serviceHost.Close();
serviceHost = null;
}
}
catch (Exception e)
{
throw e;
}
}
System.ServiceModel.CommunicationObjectFaultedException: The
communication object, System.ServiceModel.ServiceHost, cannot be used
for communication because it is in the Faulted state.
at HRBFA.Agent.WindowsService.AgentWindowsService.OnStop() in C:\tfs
\FA Nexus\Dev\Framework\HRBFA.Agent\HRBFA.Agent.WindowsService
\AgentWindowsService.cs:line 51
at System.ServiceProcess.ServiceBase.DeferredStop()
The OnStop() which i hav is
protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary
to stop your service.
try
{
if (serviceHost != null)
{
serviceHost.Close();
serviceHost = null;
}
}
catch (Exception e)
{
throw e;
}
}