G
Guest
I am working at .net 1.1, writing in c#.
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:
How can the service reach the second line if I stop it?
Is it a good way to start and stop my service or should I use other way?
Thanks in advance!
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:
Code:
MyController.Stop()
MyController.Start()
How can the service reach the second line if I stop it?
Is it a good way to start and stop my service or should I use other way?
Thanks in advance!