I have a windows service built using .NET 4.5 and topshelf library running under LocalSystem account.The service is configured to start automatically on system reboot. When the service starts it reads information from a custom configuration file(json file) which is located at 'C:\ProgramData' for configuration information.I have tested this configuration on my local PC(Windows 7) and verified the setup works without issues. Lately i attempted to install this service on a windows service on few windows 10 machines and some of them fail to start the windows service on startup.I looked at the event viewer and can see "The service did not respond in a timely fashion". I am able to start the service manually later just fine later. I have put the logic to read from the configuration on Start method inside Task.Run for the Start method to return quickly. Please advice what else i need to take into consideration to fix this issue.
For anyone struggling with this issue,we have had the same exact issue on some of the slower windows 10 machines. We were able to solve this issue by setting generatePublisherEvidence to false in the config file.