The service process could not connect to the service controller

Problem solved. I didn't follow the last part of the tutorial for adding a custom action :) I thought at first it was optional however it appears that is the final part of installing the service. Works perfect now.


The message "Service cannot be started. The service process could not connect to the service controller" is logged in the event log everytime you attempt to run a windows service from Visual Studio. Unlike most projects you create in Visual Studio, Windows Service projects cannot be run directly from the development environment by pressing F5. See the following msdn link http://msdn.microsoft.com/en-us/library/sd8zc8ha.aspx


You need to add an Installer to your service.

Go to the designer view of your service. click on the "Add Installer" link. This adds objects that are mandatory for the service installation.

enter image description here

Last thing is to make sure you run your installutil.exe with Administrator privileges.

enter image description here

Tags:

C#

Service