Windows Service - folder permissions

E

Elmo Watson

I've got a Windows Service I'm testing right now, on my local computer, but
I plan on moving it to a server later, so the answer that I need will need
to pertain to both situations.

This service is very simple - I have 3 folders (Dropped/Archived/Moved) on
my computer. A file gets dropped in the Dropped folder, and the service,
with a FileSystemWatcher control, sees it, and copies to one folder, and
moves/renames to the other folder.

The problem I'm having is that I get an error:
oException.Message "Access to the path
'C:\Projects\DroppedFiles\MyFilename.txt' is denied."

I am using the Network Service account for the ServiceProcessInstaller.

So - I need to find out what permissions are needed in this
scenario.....anyone?

(thanks in advance)
 
N

Norman Yuan

Obviously, the running account (Network Service) does not have permission to
access the folders. By default, that account has very limited access to
resources on the computer.

So, simply go to that folder, assigned needed permission to the account.
 
E

Elmo Watson

Are you talking about giving the permissions on that folder to the Network
Service Account ?
I tried giving Network Service modify permissions to that folder, but i
still get the same error.
 

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