Hi There
I have experienced this issue with services that have thrown an exception during the Start() sequence of the Process.
To find out what is causing your service to bomb out, you need to debug the service. Are you using VS to build the service? If so you need to attach to the service thread when it starts, in order to step through the process.
The problem here being that there is no thread to attach to until the service has started, and your service is not getting started. The solution is as follows.
In your method
static void Main(){}
add the line
System.Diagnostics.Debugger.Launch();
. So your method looks like
static void Main()
{
System.Diagnostics.Debugger.Launch();
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[] { new MyService1() };
ServiceBase.Run(ServicesToRun);
}
Then simply build and install your service. Then goto Service Manager and start the service. You should then see a diaogue pop up asking you what application you would like to use to debug the service. Select your VS which with the Service project open, and VS will then allow you to step through the service. You can then step through the OnStart method and see what is causing you the problem
Let me know if that helps
Tatsky