服务在永久和QUOT;启动"状态状态、QUOT

2023-09-04 01:11:09 作者:沉淀所有的痛

我写了一个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.

 
精彩推荐
图片推荐