Windows Service startup problem

G

Guest

I have create a Windows service that uses a timer to access a Web Service.
The service is set to start Automatically and its using the local system
account. The service also logs events to the event viewer and the Event
viewer is set to overwrite events as needed. The problem is that when I boot
the PC the service does not start and I got two error messages in the System
log: (Event 7000. The <MyService> service failed to start due to the
following error:
The service did not respond to the start or control request in a timely
fashion. and Event 7009 Timeout (30000 milliseconds) waiting for the
SuretxtDequeuer service to connect.). if I start the service manually, this
problem does not occur.
Can anyone help!
 
G

Guest

Hello, Kannan. Thanks for your reply.
The service has two dependencies (MSSQLSERVER AND SQLSERVERAGENT)
Also one thing that I notice just now was that the service has a reference
to a Webservice which opens a connection to the database. The database login
settings is located in the registry and the WebService reads from it. Now
this web service its been used by other applications and these applications
does not expirience these problems.
The only thing I can think is permissions.
regards
Adriano
 
G

Guest

Hello Kannan.
I finally found the problem.
The project had a Web reference to a Web service which connected to my SQL
server.
I was declaring a web reference on the top of my service.vb (private
sqlconnection as new <Web reference> and because of this, the web service was
trying to connect to the database even though SQL server MSSQLSERVER had not
started yet.
Solution was to remove the code from the top of the service.vb file, added a
new module to the project and when the timer kicked in, call a method in the
module which in turn would connected to the database.
Thanks again for your reply.

adasilva
 

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