Reading file from windows share - "Operation is disallowed in this session"

I have a scheduled agent that is supposed to run on the server. Windows share created and my personal ID has a reading access to it. I mapped the drive letter to the network share on my machine. When I run agent manually it works.

When I schedule it to run from the server I am getting “Operation is disallowed in this session” error at filename$=Dir$(temp5)

So, how do I make it work?

P.S. There is also a Windows “Generic Account” created (with the password) and it has an access to this share. This user ID had been updated to allow logon from the server.

Subject: Reading file from windows share - “Operation is disallowed in this session”

You aren’t running the agent, the server is – so it needs to have access to the network share. That may not be possible if Domino is running as a service.