Hi All,
I follow below code for file move from one folder to other folder using below Code.
Set permissionSet;
permissionSet =
new
Set(Types::Class);
permissionSet.add(
new
FileIOPermission(fileName, #io_write));
permissionSet.add(
new
FileIOPermission(newFileName, #io_write));
permissionSet.add(
new
InteropPermission(InteropKind::ClrInterop));
CodeAccessPermission::assertMultiple(permissionSet);
System.IO.File::Move(fileName, newFileName);
CodeAccessPermission::revertAssert();
while am using am facing below error
I try to solve above error using the below dll
After adding Dll also am facing error, can anyone please explain me to solve this error.
Thanks
Tony
*This post is locked for comments
So, are you running client from the AOS server ? Your file sits in downloads folder, so you should either be connected straight to the the server or you need to put your file into a shared folder if you execute the code on the server tier.
File on the local folder I give full permission to that folder also, but code not working
So, coming back to my questions:
Is your file in shared folder, so server could have access to it over network or in local folder on the same server? Does AOS user have access to it ?
Thanks for quick reply am running the code on the server.
Hi Tony,
It cannot find a file. Where do you run this code? If you run it on server then file should be accessible from the server and AOS user should have access to it.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156