Windows Service gives Access Denied error

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top