Reputation: 135
I am calling a web service in a window service using c#. Everything looks good but when the window service is installed and I try to start the window service then it says 'The service did not respond to the start or control request in a timely fashion'.
Upvotes: 0
Views: 741
Reputation: 7807
A service shouldn't DO anything real in the start method. It should start a timer to handle the real work.
There can be all sorts of network dependencies that aren't started when Windows tries to start your service.
An easy way to test this is to start the service manually after the system is up and running. If it starts properly then, you need to either update the service dependencies or move the functionality out of the start method.
If it still fails, you've got an unhandled error condition somewhere in your start method.
Upvotes: 1