Windows Service Stop working
-
Hi I have a windows service which starts with windows and i have added a timer which restarts it after 3 minutes, to follow how it is working i have logged it completely by writing it in a certain file, it usually runs fine, but for once it stop logging and also stopped working, it appears on task manager and in services window it appears as running, last log entry in before starting the timer but after that timers tick event never called, can any one think of a reason why timer event lost. Regards Shajeel
-
Hi I have a windows service which starts with windows and i have added a timer which restarts it after 3 minutes, to follow how it is working i have logged it completely by writing it in a certain file, it usually runs fine, but for once it stop logging and also stopped working, it appears on task manager and in services window it appears as running, last log entry in before starting the timer but after that timers tick event never called, can any one think of a reason why timer event lost. Regards Shajeel
I ran into this problem once, and never got to solve it. It has something to do with a timer being used in a windows service which is running on Windows Server 2003. What happens is that randomly, the timer events stop getting fired. I had to write my own timer then to get around this problem. By the way, some people do report that they got the problem solved by using the System.Threading.Timer class instead of System.Timers.Timer. So if you are using System.Timers.Timer, try using System.Threading.Timer first.
-
I ran into this problem once, and never got to solve it. It has something to do with a timer being used in a windows service which is running on Windows Server 2003. What happens is that randomly, the timer events stop getting fired. I had to write my own timer then to get around this problem. By the way, some people do report that they got the problem solved by using the System.Threading.Timer class instead of System.Timers.Timer. So if you are using System.Timers.Timer, try using System.Threading.Timer first.