Resolved the issues about the windows services can not pause and continue

来源:互联网 发布:memcache java 教程 编辑:程序博客网 时间:2024/05/16 15:40

I try to install a windows service in my local machine, ok , it's successfull, but I can't pause and continue.. eventually I found the reason.


In the design view of Services1.cs, right click the view and click "properties", there are many option.


Autolog                 Write to system log.

CanHandlePowerEvent     Accept the event of power.

CanPauseAndContinue         Enable the pause and continue feature.

CanShutdown   Enable shutdown feature 

CanStop                             Enable stop feature.

 ServiceName                       Service name.