0

Real simple, made this windows service: http://msdn.microsoft.com/en-us/library/zt39148a.aspx

Installed it, console shows no problems, navigate to Computer Management, Services and Applications, Services find my Service, Right Click - Start and this bad boy comes up.

Error Box

I have tried building it as Release and Debug, moving the file to a new folder and even looking at different answers on here : System error 5 Access is denied when starting a .NET service

Windows Service : error 5 :Access Denied

And no luck. This has been driving me mad. Please help Muchas Gracias

Community
  • 1
  • 1
JonE
  • 2,406
  • 4
  • 29
  • 46

1 Answers1

1

There is nothing wrong with the concept of a .Net service, so there is something in your environment that is preventing this to work. It is hard to debug from a distance.

Verify that :

  1. You have administrator privileges
  2. The default auto-elevate rules of "Computer Management" still apply (in doubt, rigth click and select "Run as an administrator"
  3. That the LOCAL SERVICE account has access to the binary. You can get a text version (easy to paste in a SO question) with cacls path-to-your-service.exe
ixe013
  • 8,508
  • 3
  • 43
  • 68
  • EDIT Found solution thanks to you. Thank you very much dear sir. It was that it was LOCAL SERVICE instead of LOCAL SYSTEM. – JonE Oct 22 '12 at 17:29