Windows Service - folder permissions

  • Thread starter Thread starter Elmo Watson
  • Start date Start date
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)
 
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.
 
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.
 
Back
Top