The timer use in windows service should be system.timers.timer, not system.windows.form.timer. The system.timers.timer should be in Component toolbox. But even I drag from Component toolbox, it still system.windows.form.timer control. So I manually changed in designer.cs and finally work. =)
Note: When you install the window service in windows7 and windows2008, you need to run the vs2008 console with administrator right.
here is the command to install window service
installutil servicename.exe
to uninstall the window service:
installutil -u servicename.exe
No comments:
Post a Comment