Hello,
i am using BC OnPrem 18 (Cronus database) for testing.
At this time, i want to translate some file/directory code from NAV2013 to BC180 and got "access denied" errors.
C/AL: I can search all directories with dotnet „mscorelib“ functions without any problems.
AL: I can only search local but no external directories.
I think the problem seems to be the service user who searches the directories.
Can i change the behavior that BC uses the windows user for file actions?
dotnet
{
assembly(mscorlib)
{
type("System.Object"; Object) { }
type("System.IO.Directory"; IODirectory) { }
}
}
codeunit 50200 SearchData
{
:
var
FD_Object: DotNet Object;
FD_Dir: DotNet IODirectory;
NavDir: Text;
begin
NavDir := '\\fserver\data\';
FD_Object := FD_Verzeichnis.GetFiles(NavDir, '*.pdf');
:
end;
}
Thanks
0
Answers
The client isn't handle that anymore because it is the webclient.
So if you give the NST user access to the folder it will be OK I think.
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/