错误1053:服务没有及时响应启动或控制请求 [英] Error 1053: the service did not respond to the start or control request in a timely fashion

查看:3831
本文介绍了错误1053:服务没有及时响应启动或控制请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近继承了几个作为Windows服务运行的应用程序,并且我在两个应用程序中都提供了一个gui(可以从系统托盘的上下文菜单中访问)。



为什么我们需要一个Windows服务的gui的原因是为了能够重新配置Windows服务的行为,而不需要停止/重新启动。



我的代码在调试模式下工作正常,我得到上下文菜单,所有行为都正常等。



当我安装该服务通过installutil使用命名帐户(即本地系统帐户),服务运行正常,但不显示系统托盘中的图标(我知道这是正常的行为,因为我没有



这里是问题 - 当我选择LocalSystemAccount选项,并检查与桌面交互选项时,服务需要AGES启动没有明显的原因,我jus不断获得


无法在本地计算机上启动...服务。


错误1053:服务没有及时响应启动或控制请求。


顺便提一下,我通过注册表黑客将Windows服务超时从默认的30秒增加到了2分钟(请参阅 http://support.microsoft.com/kb/824344 ,在第3部分搜索TimeoutPeriod),但服务启动仍然超时。



我的第一个问题是 - 为什么本地系统帐户的登录比使用非LocalSystemAccount的服务登录时要比SOOOOO更长,导致Windows服务超时?这两者之间有什么区别呢在启动时引起这种不同的行为?



其次 - 退后一步,我想要实现的只是一个Windows服务提供配置的gui - 我很乐意使用非本地系统帐户(使用命名的用户/ pwd)运行,如果我可以让服务与桌面交互(即具有上下文菜单从系统托盘中可用)。这是可能的,如果是这样的话?



任何指向上述问题的指针都将不胜感激!

解决方案

在这个消息打了几天之后,一位朋友告诉我你必须使用Release版本。当我安装调试版本,它给出了这个消息。发布版本开始很好。


I have recently inherited a couple of applications that run as windows services, and I am having problems providing a gui (accessible from a context menu in system tray) with both of them.

The reason why we need a gui for a windows service is in order to be able to re-configure the behaviour of the windows service(s) without resorting to stopping/re-starting.

My code works fine in debug mode, and I get the context menu come up, and everything behaves correctly etc.

When I install the service via "installutil" using a named account (i.e., not Local System Account), the service runs fine, but doesn't display the icon in the system tray (I know this is normal behavior because I don't have the "interact with desktop" option).

Here is the problem though - when I choose the "LocalSystemAccount" option, and check the "interact with desktop" option, the service takes AGES to start up for no obvious reason, and I just keep getting

Could not start the ... service on Local Computer.

Error 1053: the service did not respond to the start or control request in a timely fashion.

Incidentally, I increased the windows service timeout from the default 30 seconds to 2 minutes via a registry hack (see http://support.microsoft.com/kb/824344, search for TimeoutPeriod in section 3), however the service start up still times out.

My first question is - why might the "Local System Account" login takes SOOOOO MUCH LONGER than when the service logs in with the non-LocalSystemAccount, causing the windows service time-out? what's could the difference be between these two to cause such different behavior at start up?

Secondly - taking a step back, all I'm trying to achieve, is simply a windows service that provides a gui for configuration - I'd be quite happy to run using the non-Local System Account (with named user/pwd), if I could get the service to interact with the desktop (that is, have a context menu available from the system tray). Is this possible, and if so how?

Any pointers to the above questions would be appreciated!

解决方案

After fighting this message for days, a friend told me that you MUST use the Release build. When I InstallUtil the Debug build, it gives this message. The Release build Starts fine.

这篇关于错误1053:服务没有及时响应启动或控制请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆