Windows Service Hangs at startup on 2003 Server R2, but runs fine on XP?
I have awindows service that watches files and sends email and talks to other computers,uses sqldatabaseetc. It was working fine on my XP server but as soon as I installed it on windows 2003 server R2 it started to hang on startup and I get the classic dialog device or service hang or have trouble starting. After I press ok and let the computer run for a while it starts fine, or aftersomeone gets logged in windows itstarts the service runs fine.. Are there any settings or ideas anyone has as to why this happens onwindows 2003 and NOT XP and how I fix it? Thanks for your contributions!
July 18th, 2007 11:25pm

That could be because of some dependencies, that your service starts before a service it needs, like networking for example. Check this out: http://support.microsoft.com/default.aspx/kb/193888
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2007 8:23am

Thanks for the reply Joachim. I tried this even to the point of adding virtually every service as a dependency, or at least every service running when my service is running, and it does delay the dialog, but the same error happens, it just takes longer. If I dont log in for instance, it will sit at the login screen or 'press ctrl alt dlt' screen, and then up to a minute or two later.. the same error dialog will pop up and say the same thing about a device or service. This is very strange.
July 19th, 2007 3:54pm

Have you tried a delayed start? Let it wait for 5 mins after boot until it starts?
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2007 4:52pm

What exactly is the best way to do this? I tried adding certain dependencies (spooler/messenger) and gave the service several other dependencies to delay it as much as possible from starting before anything else does. Thanks
July 19th, 2007 10:20pm

I'd recommend debugging your service and see what's different between XP and 2003. Since it runs fine on XP but not on 2003 something is bound to be a little fishy.
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2007 10:29pm

Yea he said he went through debug or something but didnt see anything out of the ordinary.. said it was probably my windows 2003 settings, especially since it worked on XP! haha. he said there wasnt anything else he could do to debug it since it runs fine and only hangs like this on startup... very strange indeed.
July 19th, 2007 10:35pm

What else is on your system? Have you tried it on a vanilla install without anything else? No SP, SP1, SP2?
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2007 10:29am

No I have not tried it on windows 2003 no service pack, I could try this. I am however suppose to give this 'service' to users thats have windows 2003 with latest service pack. Hmm. Just doesnt make any sense. It works on 2003, but always hangs on startup. After you press 'OK' after the hang dialog, it still starts the service fine. Why does this dialog even pop up if its going to start anyway? I even tried setting every single service to start before and delay the service, and still it pops the hang dialog, it just takes longer to come up. Thanks.
July 24th, 2007 4:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics