Server permissions in ax

Hi Guys,

What are permissions required to save a file on a server like in my code

Ex: -

saveTmpFileName= System.IO.Path::GetTempPath()+“hyd.jpg”;

binData.saveFile(saveTmpFileName);

while saving a file i am getting error regarding permissions and that code is running on server as well as i have access to save a file

First of all, please be more specific about the error. Just that it’s something about permissions isn’t sufficient. For example, it may be about code access permissions and not file access permissions.

That you have access to the file doesn’t mean that the account actually running the code has access too. Has the AOS service accounts write permissions for this file?

sorry for that unclear question

Below screen shot showing those errors

All right, so it’s really about missing code access permissions in your code and not about file system permissions.

Before accessing the file from code, you have to explicitly allow that by creating a FileIoPermission object, pass the file path to its constructor and call asert().