Which windows service controls network?
I'm writing a service which is running into the following error on startup, but works fine when I restart the service a few minutes later:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
I'm guessing the problem is that my service is starting before the network connections are established, so I did some digging and it seems you can set service dependencies in the registry. My question is which service should I set my service to depend on to resolve my issue? I tried Dhcp but no luck... I don't really know much about hardware/networking so any help is appreciated (if there is a better way to solve my issue that would be great as well).
Posted Feb 12, 2013, 9:36 PM UTC
Couldn't you just catch that exception, wait a short bit, and try again?
Alternatively, you can configure a windows service to start automatically after a delay. That might be enough.
The delay start setting only works on vista and beyond, however I need it to work for XP as well. I also tried your first method, but it didn't work and my guess is that for some reason windows is waiting for my service to run before attempting to establish a network.
That doesn't sound good...
Is it in the Service initialize that you tried (as in, services.msc would still be showing its progress bar and saying that it's attempting to start the service)?
If so, could you move the network bits out of there, and just try to get a connection at some later time?