Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of windows services that I recently moved to a new box. These are .net applications (v4.0) that were installed using the installutil application. What is happening now with these applications is that whey they are stopped remotely or via Services manager UI the process associated with that service does not terminate. I realize some delay may be expected but even after a very long wait the services still appear to be running when I look via the task manager. When the service is then started back up second instance of the exe process is started.

Seeing as this is a new box I am wondering if there could be something else running on the box that is preventing this from occurring.

This does not reproduce on the old machine, not does it seem to be happening with other services on this box.

Any thoughts on how I might track down what is happening?

share|improve this question

closed as off topic by mdpc, chutz, faker, Bryan, growse Dec 22 '12 at 17:40

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Yes, your .NET code needs to be fixed. It's not handling service stop requests properly. I know it "worked fine" on your old server, but I'm sticking to my story. :P

First, check your Event Logs for unhandled .NET exceptions. If that doesn't get you anywhere, then go to your code.

You probably have a method in your code that looks something like

protected override void OnStop() { ... }

I would start adding some logging to the code right around there and try to figure out where it's failing.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.