Failed to stop service.
System.ServiceM odel.Communicat ionObjectFaulte dException: The
communication object, System.ServiceM odel.ServiceHos t, cannot be used
for communication because it is in the Faulted state.
at HRBFA.Agent.Win dowsService.Age ntWindowsServic e.OnStop() in C:\tfs
\FA Nexus\Dev\Frame work\HRBFA.Agen t\HRBFA.Agent.W indowsService
\AgentWindowsSe rvice.cs:line 51
at System.ServiceP rocess.ServiceB ase.DeferredSto p()
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.Clo se();
serviceHost = null;
}
}
catch (Exception e)
{
throw e;
}
}
System.ServiceM odel.Communicat ionObjectFaulte dException: The
communication object, System.ServiceM odel.ServiceHos t, cannot be used
for communication because it is in the Faulted state.
at HRBFA.Agent.Win dowsService.Age ntWindowsServic e.OnStop() in C:\tfs
\FA Nexus\Dev\Frame work\HRBFA.Agen t\HRBFA.Agent.W indowsService
\AgentWindowsSe rvice.cs:line 51
at System.ServiceP rocess.ServiceB ase.DeferredSto p()
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.Clo se();
serviceHost = null;
}
}
catch (Exception e)
{
throw e;
}
}
Comment