C# – Error 1053: the service did not respond to the start or control request in a timely fashion

cconfigurationwindowswindows-services

I know this question has been asked twice.But both of them didn't help me.My code is working fine like onstart is for initialization the timers etc.
I have C# windows service which is running as some accnt not local.
Im currently using CCtray to deploy and start the service so it doesn't give me any error.
But sometimes manually I need to stop and start it again.And that's where I see this msg.
I know microsoft has a hotfix for sp1 but I don't know whether they have for sp2.And my server where service is located is sp2.

Best Answer

I know microsoft has a hotfix for sp1 but I don't know whether they have for sp2.And my server where service is located is sp2.

If we made a hotfix for SP1, the fix is already in SP2. Also, don't do anything in the OnStart, start up a separate thread to do anything and respond to SCM requests as fast as possible.