Basically the problem raises when we try to load a word document from memory stream (byte array representation of base64 string). In that moment (on loading the document using the Aspose.Word for Net API), raises the following exception:
Request for the permission of type ‘System.Security.Permissions.FileIOPermission’ failed.
Note that, we merge the Aspose.Words for .Net dll with a Dynamics 365 plugin dll, and we upload the resulting dll into Dynamics 365 online tenant. The plugin calls the Aspose.Words for Net API in order to convert a .docx document (already loaded in memory) into pdf. That functionality (conversion to pdf) works fine on Dynamics 365 on premises, since in this environment the dll is executed as “fully trusted”. On the other hand, Dynamics 365 online only admits partially trusted execution, so access to file system is not allowed (between other restrictions).
Please, let me know if you need more information regaring our problem.