I have windows service with a COM object.
Every unexpected time The COM object throw an error that make my service get
stuck (do not respond).
I can catch this error.
I want to restart my windows service every time the COM object throws an
error.
I use System.ServiceProcess.ServiceController to stop and start my service.
But there is one thing I do not understand:
When I write in the service code:
Expand|Select|Wrap|Line Numbers
- MyController.Stop()
- MyController.Start()
Is it a good way to start and stop my service or should I use other way?
Thanks in advance!