We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error while opening Word document from memory stream in Sandbox environment (Dynamics 365, .Net 4.5.2)

Hello,

We are trying to load a word document from memory stream (byte array representation of base64 string), and we are getting the following error:

Request for the permission of type ‘System.Security.Permissions.FileIOPermission’ failed.

Is there any way in Aspose.Words to solve that? We cannot change to full trust since we have no control over Dynamics 365 …

Is the only one solution use Aspose for Cloud?. In that case, can you refer me a concret example?

Thanks in advance

Hello,

After searching more information in previous topics, we have concluded that we need to use Aspose Words Cloud.

Regards

@fjbermejoInfoavan

Thanks for your inquiry. You can use Aspose.Words for .NET where .NET is installed. Please make sure that you have full rights to document where you are importing it into Aspose.Words’ DOM.

Could you please share some more detail about your use case? We will then provide you more information about your query.

Hello,

First, thanks for your reply. Finally we have used Aspose for Cloud (c# SDK, trial account) with success.

Best regards

Hello,

Finally, our customer thinks that price of Aspose.Words for Cloud is too high. Is It possible to get an alternative solution from aspose?. Is there any possibility of using Aspose.Words for .NET in Dynamics 365 Online (partially trusted environment)? Could you confirm us that Aspose.Words for .Net is not compatible with Dynamics 365 online?

Thanks in advance

@fjbermejoInfoavan

Thanks for your inquiry. At the backend, Aspose.Words for Cloud uses Aspose.Words for .NET as codebase. You can work with document

Could you please share some more detail about your use case? We will then provide you more information about your query.

Hello,

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.

Best regards

@fjbermejoInfoavan

Thanks for sharing the detail. We are working over your query and will get back to you soon.

@fjbermejoInfoavan

It looks like Aspose.Words for .NET cannot be used in Dynamics CRM Online plugins because those plugins have to be sandboxed. Instead, Aspose.Words Cloud is web-based REST API so it can be used. We have recently released Aspose.Words Cloud SDK for .NET library.