我有一个基本的C#控制台应用程序,我想作为Windows服务运行。将C#控制台应用程序作为Windows服务运行
我使用sc create
创建了Windows服务。这工作得很好,我可以看到我的服务在services.msc
。当我试着开始这项服务,我得到以下错误:
Could not start the PROJECT service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion.`
我看,这可能是由于服用时间超过30000 毫秒执行服务代码。因此,我删除了大部分的代码,几乎没有任何东西正在执行..但同样的错误仍然存在。
我在这个项目中使用.NET 3.5。
这会导致什么?
你的过程是否真正开始?我怀疑这是开始失败, – zdan 2011-06-03 01:16:02
http://stackoverflow.com/questions/593454/easiest-language-for-creating-a-windows-service/593803#593803 – 2011-06-03 07:38:21