I am developing an app to install & run as a Windows service. It’s still buggy and stopped unexpectedly (leaving nothing in the Windows Event log either) and when I tried to start it up again I got the error
Windows could not start the {name of service} service on Local Computer.
Error 1067: The process terminated unexpectedly.
I restarted the computer (Server 2008 R2; a virtual machine, in case that makes a difference), no help. Uninstalled and reinstalled my service, and still get that error!
Something on the machine needs cleared out / refreshed so that it will attempt to start the service again. I don’t want to rebuild the whole virtual machine but I’m out of ideas.
UPDATE
I forgot to mention that this Windows service — exact same code & install — is running on 3 other machines without the above error. Putting in that debugger in OnStart() still sounds like the way to go though.
If you have access to the code, you can add a method
Debugger.Breakat the first line of theOnStartmethod.Once you “break” into the application investigate where the exception is thrown.