I am currently writing a Service application and have been having a few issues ( https://plus.

I am currently writing a Service application and have been having a few issues ( https://plus.google.com/108221563060569563805/posts/c4nVPaK6hth ). I decided to use OutputDebugString ( as the debug method I was using did not appear to be catching an error ).

I stuck the OutputDebugString at the top and bottom of every relevant procedure, So:

ServiceAfterInstall, ServiceStart and ServiceStop

... and in the DPR at the point when everything is being constructed.

I don't seem to be able to get beyond Starting the Service.

When I install the Service the OutputDebugString debug appears as I would expect. However, as soon as I start the Service it is stopped automatically with a message: 

"The Unity Express Alerts service on Local Computer started and then stopped. Some services stop automatically if they are not in use buy other services or programs." 

I looked in the Event Viewer and the log states "Service failed on start: list index out of bounds[0]". 

However, why do I not see any OutputDebugString debug for ServiceStart AT ALL. I have placed my OutputDebugString line at the VERY TOP of that routine.

Any help would be appreciated

Thanks
Tony

Comments