Windows Service on NetworkService account can't access remote (shared) directory

Posted by Aetius on Stack Overflow See other posts from Stack Overflow or by Aetius
Published on 2010-03-26T21:52:58Z Indexed on 2010/03/28 23:43 UTC
Read the original article Hit count: 156

I'm trying to remotely access a shared folder with a Windows Service set to NetworkService account permissions. However, I get errors when I try to do this, e.g. Directory.Exists(servicePath) returns false, FileSystemWatcher doesn't recognize activity in the directory.

If I change the service's account to LocalSystem, these methods work. I don't want to give the service root-level access, though. It seems to be a permissions problem, so how can I give the service permission to access the directory and monitor it?

© Stack Overflow or respective owner

Related posts about c#

Related posts about remote