Windows Service & Timer event

  • Thread starter Thread starter caulker
  • Start date Start date
C

caulker

I have a windows service with a Timer which runs just fine on my Development
machine, but the "timer_elapsed" is not being executed on the Production
machine.
same .exe on both machines.
i'm writing events to the event log, so i know the dev machine is fine, but
not the production machine.

what gives?
 
standard toolbox timer

Nicholas Paldino said:
caulker,

What kind of timer are you using?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

caulker said:
I have a windows service with a Timer which runs just fine on my Development
machine, but the "timer_elapsed" is not being executed on the Production
machine.
same .exe on both machines.
i'm writing events to the event log, so i know the dev machine is fine, but
not the production machine.

what gives?
 
caulker,

Are you using the one under the Windows Forms tab? If you are, then
this won't work, because it depends on windows messages, which are not
enabled in services unless you check that it can interact with the desktop.

Make sure that the timer is the one from the System.Timers namespace,
and it should work.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

caulker said:
standard toolbox timer

message news:[email protected]...
caulker,

What kind of timer are you using?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

caulker said:
I have a windows service with a Timer which runs just fine on my Development
machine, but the "timer_elapsed" is not being executed on the Production
machine.
same .exe on both machines.
i'm writing events to the event log, so i know the dev machine is
fine,
but
not the production machine.

what gives?
 
yep, I'm using

private System.Timers.Timer timer1;

and this works just fine on the Dev machine, just not on the Production
machine.

the windows service is running just the timer event is not being
triggered...

very puzzling...

thanks...



Nicholas Paldino said:
caulker,

Are you using the one under the Windows Forms tab? If you are, then
this won't work, because it depends on windows messages, which are not
enabled in services unless you check that it can interact with the desktop.

Make sure that the timer is the one from the System.Timers namespace,
and it should work.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

caulker said:
standard toolbox timer

message news:[email protected]...
caulker,

What kind of timer are you using?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have a windows service with a Timer which runs just fine on my
Development
machine, but the "timer_elapsed" is not being executed on the Production
machine.
same .exe on both machines.
i'm writing events to the event log, so i know the dev machine is fine,
but
not the production machine.

what gives?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top