I’m using .Net 4 to build a simple windows service , the problem happens when I want to make a 5 min delay before starting the service.
protected override void OnStart(string[] args)
{
// make a 5 min delay
// do something
}
but after few seconds the service stops and gives me a time out error (saw this in the event-log).
what am I suppose to do?
Start your long running process in a new thread, so don’t block the
OnStartmethod. example: