System error 5 Access is denied when starting a .NET service System error 5 Access is denied when starting a .NET service windows windows

System error 5 Access is denied when starting a .NET service


To get it to work I needed to add permissions to the output bin\debug folder for my service project.

The Local Service account didn't have permissions to the output .exe file, and this was why the error was occuring.


Had the same issue.

Fixed by running the service under "Local System Account"

enter image description here


In my case the solution was even that simple: Run Command Prompt as administrator.