Windows Service doesn't start automatically
I have a windows service written in .Net 3.5 set to be automatically start, but it wouldn't start when system reboots.
As I understand, it may be caused by my service's dependency aren't started when the services tries to start. I don't know what my service depends on. I tried the workaround by adding windows print spooler as one of my service's dependencies, since print spooler is one of 开发者_JAVA百科the services start quite late during the boot-up. Well, the work around doesn't work neither.
I'm using windows server 2003 r2. so the "delayed automatically restart" option is not available to me. and I can't use windows server 2008 just for this.
I'm out of ideas at the moment. Any suggestion would be appreciated.
A few suggestions to try out:
- Check the system even logs
- Add logging to your service, e.g. to system event log or use log4net
- Strip the service down to a single message in the start-up or create a new stripped-down minimal service with as little dependencies as possible. See whether this starts
- Check under which account your service is running and whether this account has the permission to "Run As A Service"
精彩评论