getting error while try to start service
To add another possibility, see answer #7 on this link.
The jist of the solution is to assign the service name as you expect it to be at initialization time. In my situation, the Service.ServiceName
field was not set
Consider using log statements to write the service name just prior to ServiceBase.Run(servicesToRun)
.