Windows Service gives Access Denied error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I’m writing a Windows service in C# that needs to run in the NetworkService
account, but when I create an Installer and set
ServiceProcessInstaller.Account to NetworkService on an otherwise unaltered
new project, I get an “Error 5: Access Denied†message when I try to start
the service, even when logged in as Administrator.

Does anybody know why this is happening or how I can get around it?

Thanks in advance
 
The problem was caused by a permissions restriction on the machine.

I don't know exactly what the permissions restriction is, but I know that
the problem went away when I switched from my workstation to my test machine.

Sorry for wasting people's time.
 
Back
Top