System.Timers.Timer bug
It took me a long time to find out a bug in System.Timers.Timer. I've spent several hours on that issue, wondering why timer.elapsed event is not fired on certain computers, while it works fine on the others. Hell, I was writing a simple windows service. The workaround - use System.Threading.Timer instead with its callback delegate like so:
protected override void OnStart(string[] args)
{
eventLog1.WriteEntry("Starting Polling Service");
timer = new Timer(
new TimerCallback(CallbackProc), null, 0, 10000);
}
Monday, October 18, 2004 10:11 AM