views:

370

answers:

1

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.

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.

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".

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

+3  A: 

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.

Remy Lebeau - TeamB