Service not fully stopped after ServiceController.Stop()

后端 未结 5 917
时光说笑
时光说笑 2021-01-18 04:16
ServiceController serviceController = new ServiceController(someService);
serviceController.Stop();
serviceController.WaitForStopped();
DoSomething();
5条回答
  •  無奈伤痛
    2021-01-18 05:18

    I've seen this before when I stopped a service that was a dependency to another service, and the second service was holding resources I didn't even know it was using. Do you think this might be the case? I know SQL has quite a few different components, but I haven't looked into whether there are multiple services associated with it.

    Good luck!

提交回复
热议问题