CLEAR(rlFile); rlFile.SETRANGE(Path, '\\AnotherServer\MyDirectory\'); rlFile.SETRANGE("Is a file", TRUE); IF rlFile.FINDSET THEN REPEAT vFile := rlFile.Path + rlFile.Name; vRutaServidor := cFileManagement.UploadFileSilent(vFile ); flFile.OPEN(vRutaServidor); flFile.CREATEINSTREAM(InStream); XMLPORT.IMPORT(50009,InStream); flFile.CLOSE; UNTIL rlFile.NEXT = 0;
vFile := '\\AnotherServer\MyDirectory\myfile.XML'; vRutaServidor := cFileManagement.UploadFileSilent(vFile); flFile.OPEN(vRutaServidor); flFile.CREATEINSTREAM(InStream); XMLPORT.IMPORT(50009,InStream); flFile.CLOSE;
Answers
If the server accesses a file, it does so with the credentials of the service user.
If you want to access a file with the credentials of the client user, upload it first (or, if you absolutely must, use client side Dotnet).
Thx.