I’m running .Net app on Linux container (.Net core) and trying to access network share on windows server.
DirectoryInfo dir = new DirectoryInfo(@"\server.domain.fqdnpathdirectory");
FileInfo[] files = dir.GetFiles();
foreach (FileInfo file in files)
{
Console.WriteLine(file.Name);
}
and got the error:
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path '/app/\server.domain.fqdnpathdirectory'
Means that the app refer the UNC path as local path on the workdir.
How can i make it reconize that it’s UNC and act appropriately?