I have a C # process that needs to read a file that exists in a shared folder on a remote server.
In the code below, the result is "Share does not exist." recorded on the console.
string fileName = "someFile.ars"; string fileLocation = @"\\computerName\share\"; if (Directory.Exists(fileLocation)) { Console.WriteLine("Share exists."); } else { Console.WriteLine("Share does not exist."); }
The process starts under the AD user account, and full access permissions in the shared directory are granted to the same account. I can successfully map the share as a network drive on the machine where the process is located, and can copy files to / from the directory. Any ideas on what I am missing?
Brian source share