[RESOLVED] Windows Service starting "too fast"
Hi guys,
I created a Windows Service that uses MySQL. But this week I noticed that after a server reboot, I get a few MySQL Exceptions after the services is started: 'Unable to open connection to "MySQL, MySQL provider 6.2.20". Unable to connect to any of the specified MySQL hosts.'
It looks like that my service is started before the MySQL service. Is there any way to prevent this? Or can't there be anything done about it and should I just ignore the errors...
1 Attachment(s)
Re: Windows Service starting "too fast"
Windows services allow you to set dependent services. The SCM will ensure that these services are started before starting your service.
In your project installer, open the ServiceInstaller properties and set the ServicesDependsOn property.
The example below shows a service that depends on the Message Queue service.
Re: Windows Service starting "too fast"