Windows service does not start automatically

I have a Windows service written in .Net 3.5 that starts automatically, but does not start when the system reboots.

As I understand it, this may be due to the fact that my service dependency does not start when the services start. I do not know what my service depends on. I tried a workaround by adding the Windows Print Spooler as one of my dependencies between services, since the Spooler is one of the services that started quite late at boot time. Well, the work around doesn't work either.

I am using Windows Server 2003 r2. therefore, the option “delay automatic restart” is not available to me. and I can’t use Windows Server 2008 for this.

I have no ideas at the moment. Any suggestion would be appreciated.

+3
source share
1 answer

A few tips:

  • Check system even logs
  • Add an entry to your service, for example. to the system event log or use log4net
  • Divide the service to one message at startup or create a new reduced minimum service with minimal dependencies. See if it starts
  • Check which account your service is running on, and whether this account has permission to "Run the service"
+1
source

Source: https://habr.com/ru/post/1758122/


All Articles