简体   繁体   中英

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

I know this question has been asked twice.But both of them didn't help me.My code is working fine like onstart is for initialization the timers etc. I have C# windows service which is running as some accnt not local. Im currently using CCtray to deploy and start the service so it doesn't give me any error. But sometimes manually I need to stop and start it again.And that's where I see this msg. I know microsoft has a hotfix for sp1 but I don't know whether they have for sp2.And my server where service is located is sp2.

I know microsoft has a hotfix for sp1 but I don't know whether they have for sp2.And my server where service is located is sp2.

If we made a hotfix for SP1, the fix is already in SP2. Also, don't do anything in the OnStart, start up a separate thread to do anything and respond to SCM requests as fast as possible.

另一个原因是,如果您以“调试”模式将DLL复制到安装文件夹,则会出现此问题。您需要做的是以“发布”模式运行项目,将DLL复制或直接形成Release文件夹而不是Debug文件夹,并将该DLL复制到安装文件夹中,它将起作用。您可以看到DLL的大小减小了,它将不包含任何调试符号,并且像这样

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM