Managed Windows Service won't Autostart

M

mageos

Hello all!

I have a tricky problem. I have a Windows Service project that is set
to autostart at system boot, however when I boot the service fails to
start and I get an error in the Event Viewer saying the service failed
to start in a timely manner.

I did some research and it appears that what is happening is that
Service Control Manager is starting my process, but it is taking more
than 30 seconds for the service to call StartServiceCtrlDispatcher,
which is called by ServiceProcess.Run().

Based on that, I created a new service that is just an empty windows
service project. I compiled it and replaced my service with the empty
service and get the same results. Now this only happens on some slower
machines, and since even an empty service has the same problem, I am
guessing that the problem is it is taking more than 30 seconds for the
..Net runtime to be loaded for the process.

If the above is the case:
- is there anything I can do to help the framework load faster?
- Are there any other services that I can make my service dependent
on that the runtime is also dependent on?

I would appreciate any help I can get.

Best regards,

Mageos
 
O

Ollie

have you set the dependencies for the service start ?, this might help if
your service does not start until all the required OS services are started
before your service.

HTH

Ollie Riches
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top