I assume you are reading files from a Windows share, like \\COMPUTER2\Share\Path\file.ext
.
Account under which the server runs must be able to
- Access the network,
- Authenticate with the domain controller
- Able to logon to COMPUTER2 from the network (assigned via Control Panel->Admin tools->Local Security Policy).
- Have access rights to the share in question.
LocalSystem and LocalService fail at #1. No network access.
NetworkService gives you #1, but fails on #2 - it's a local account and domain controller does not know about it.
What you need is to run the service under a specific domain acount, not local account, and configure that account to be able to logon remotely to COMPUTER2 and have read access to share Share.
Alternatively, you may expose your files via different protocol that does not require authentication, e.g. ftp or http.