I have built a windows service in C# using .NET framework 4.7.2. I debugged the service and it works fine as intended.
To install the service, I built it in release mode and run following command in command prompt with administrator rights:
installutil -i "full path to service.exe file"
Service installed successfully and started appearing in Services. But, when I tried to start the service, it is giving below error in Event Viewer:
Faulting module name: ntdll.dll, version: 10.0.19041.546, time stamp: 0x5b56177b
Exception code: 0xc00000fd
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
User contributions licensed under CC BY-SA 3.0