Note that there are some explanatory texts on larger screens.

plurals
  1. POWinService sometimes fails to start after boot
    primarykey
    data
    text
    <p>I have a few Windows services (all written in C#) that all show the same strange behaviour. I have them set to delayed auto start so that they get started after the boot (delayed because well they are not critical). They all host WCF services as parts of Client-Server applications and were installed using WiX if that matters. </p> <p>I noticed that sometimes they just don't start. If you look into the Services window fast enough after the OS is ready they have status "Starting". If you then refresh the view they are no longer starting but not "Started" either. You can then start them manually without any problem whatsoever.</p> <p>This produces no error messages and no log entrys. And to make it even better this only occurs if the machine has been shut down and turned on again. Reboot works perfectly fine every time (tried it about 20 times on two different machines)</p> <p>If you set the failure actions to restart the service after failure it seems it will eventually start the service successfully but surely this can not be the ideal solution.</p> <p>OSs are Windows 7 and WinServer 2008 R2</p> <p>What am I missing here? Why do they fail to be started automatically(the first time at least)? And why does it make a difference if the computer boots following a reboot or a shutdown?</p> <p><strong>EDIT:</strong> I was wrong about the failure actions. The did not fix the problem.</p> <p><strong>EDIT 2:</strong> I have added exception handling around everything to log possible exceptions. But so far no exceptions have been logged.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload