1
votes

I build a windows service and I am getting the Error 1053 and not sure why. This is what my onstart looks like :

protected override void OnStart(string[] args)
{
   var workerThread = new Thread(Worker);
   workerThread.Start();
}

I spawned off a new thread as I should but I am still getting no joy.

1
are you certain your worker thread is not throwing an error - an easy way to find out it put a thread sleep statement in onstart for 20's or so and then attach the debugger to the process so you can see whats happening.Doug
Is there anything in the service's constructor (or other initialization code) that could take a significant amount of time to run?Iridium
What does long running processes matter, isn't it all async on that new therad?Al Katawazi
Or control request. How about the rest of them, OnPause, OnContinue, etc.Hans Passant
@Al Katawazi - if the service takes too long to initialize (i.e. the code that runs before the SCM is even able to call OnStart) then you'll get this error. You can also get this error if the class implementing the service fails to initialize correctly (e.g. exception in constructor).Iridium

1 Answers

1
votes

To resolve this problem, obtain the latest service pack for the Microsoft .NET Framework 1.1. http://support.microsoft.com/kb/885055/

Error can be read here http://support.microsoft.com/kb/839174