I have developed a windows service using Topshelf. it works fine locally. When i deployed to test and try to start the service, it is giving me the following error:
Error 1053: The service did not respond to the start or control request in a timely fashion.
The test server is running on Windows server 2012.
This is my service start and stop methods:
public void Start()
{
_logProvider.Info("Service started.");
StartScheduledJobs();
}
public void Stop()
{
_scheduler.Shutdown(true);
_logProvider.Info("Service stopped.");
}
private void StartScheduledJobs()
{
try
{
_scheduler.Start();
ScheduleDeleteJob();
}
catch (Exception ex)
{
_logProvider.Error("", ex);
}
}
Can anyone help me what could be the reason with the solution please?
Thanks