服务在永久和QUOT;启动"状态 [英] Service In Perpetual "Starting" Status

查看:169
本文介绍了服务在永久和QUOT;启动"状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个Windows服务在C#中可以转换WAV文件转换成MP3,然后将它们存储在远程服务器上。在我的发展钻机(OS:WinXP的SP3)的服务启动了罚款,并运行它应该的方式

I've written a windows service in C# that converts wav files into mp3 and then stores them on a remote server. On my development rig (OS: WinXP SP3) the service starts up fine and runs the way it's supposed to.

当我安装了它的生产机器:它无法启动及时,并保持在一个恒定的启动​​状态(OS WinServer 2000),在启动该服务。该方案显然是工作,但因为文件被转换和传输。

When I installed it the production machine (OS: WinServer 2000), upon starting the service it fails to start in a timely fashion, and remains in a constant "Starting" status. The program is clearly working though since the files are being converted and transferred.

我的直觉是,这个问题在定时器组成部分,我认为Windows 2000 Server的计算机上,定时器可能会导致系统注册该程序为启动。

My hunch is that the problem is in the timer component, I think that on the Windows 2000 Server machine, the timer may be causing the system to register the program as "Starting".

有什么我失踪有关Windows Server 2000?

Is there something I'm missing about Windows Server 2000?

推荐答案

我不熟悉.NET编写的服务,但在一般情况下,所使用的线程来启动服务并报告其初始状态不应该在同一个线程执行的实际工作。该服务应产生一个工作线程使切入点能够很快恢复状态,以供应链管理。

I'm not familiar with writing services in .NET, but in general, the thread that is used to start the service and report its initial status should not be the same thread that performs the actual work. The service should spawn a worker thread so the entry point can return status to the SCM quickly.

这篇关于服务在永久和QUOT;启动"状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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