Windows服务无法启动 [英] Windows Service cannot be started
问题描述
您好,
我创建了一个新的Windows服务,并成功安装了该服务,但是很遗憾,该服务无法启动,并且不断向我提供以下内容:
I created a new windows service and I managed to installed it successfully, But, unfortunately the service cannot be started, and it keeps giving me the following:
错误1503:服务没有及时响应启动或控制请求.
Error 1503: The service did not respond to the start or control request in a timely fashion.
从事件查看器中,错误显示:
And from the event viewer, the error says:
服务无法启动.服务进程无法连接到服务控制器.
Service cannot be started. The service process could not connect to the service controller.
我试图调整注册表中的超时时间,但到目前为止还没有运气.有什么想法吗?例如,我是否错过了对"OnStart和OnStop方法"实施关键操作的想法?或我需要做些其他的事情来启动服务吗?
I tried to adjust the timeOut period in registries but no luck so far. Any idea on what is going on? Did I miss to implement something critical on "OnStart and OnStop methods for example? Or I need to do something else to start the service?
仅供参考,我之所以实现这项服务,是因为要在Windows后台自动运行另一个应用程序(exe)文件(作为一项服务).换句话说,我已经实现了另一个应用程序,并且Windows窗体应用程序可以选择安装 /将应用程序作为服务运行.这有可能实现吗?
FYI, I implemented the service for a reason of running another application (exe) file automatically in windows background (as a service). in other words, I have another application that I implemented and that windows form application has an option to install /run the application as a service. Is this is something possible to achieve?
推荐答案
您好,RoujT,
Hi RoujT,
感谢您的信息.
>>错误1503:服务没有及时响应启动或控制请求.
我对您提供的错误消息进行了研究.我发现这似乎是一个已知问题.
I did a research for the error message you offered. And I found it seems like a known issue.
解决此错误的方法是为Microsoft .NET Framework 1.1安装最新的Service Pack.
The solution of solve this error is to install the latest service pack for the Microsoft .NET Framework 1.1.
有关详细信息,请参阅以下文档:
For the detailed information, please refer to the following document:
https://support.microsoft.com/en-us/kb/839174
最好的问候,
肖湖
这篇关于Windows服务无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!