How does one set Full Trust Permissions for the Aspose .Net Components?

We have a Windows Service that calls the Aspose.Total Components. We are experiencing an issue where the service will not start on some VMs and this is related to permissions. You indicate that the Aspose .Net components require Full Trust permissions. What exactly is this and where is it set ?

We have a render.exe.config file for the service that has the configuration file. Do we set it here ? How ?

@bns_group,

You may please refer to topic How can I run an exe or windows service in medium trust? for detail. Furthermore please update us that which Aspose components are used by your Windows Service.

We are using all the Aspose.Total, specifically word, excel, pdf, components.

Can you clearly describe where we set Trust Permissions in .net so we can try some options.

@bns_group,

All Aspose .NET components are recommended to run with Full Trust permission set.

Internet Service Providers hosting multiple applications from different companies mostly enforce Medium Trust security level. In the case of .NET 2.0, such a security level may set the following constraints which could affect the ability of Aspose.Words to perform properly.

RegistryPermission is not available. This means you cannot access the registry, which is required to enumerate installed fonts when rendering documents. FileIOPermission is restricted. This means you can only access files in your application’s virtual directory hierarchy. This potentially means fonts cannot be read during export.

For these reasons specified above, it is recommended that Aspose.Words runs under Full Trust permissions.

For Aspose.Cells:
There are two ways to grant full trust to your assembly.

1 - Add assembly in GAC
2 - Inside the Web.config file use a child fullTrustAssemblies configuration section to grant assembly full trust.

Code runs with full trust (code from the GAC always runs in full trust).

Granting ASP.NET Full Trust to Assemblies:

The ASP.NET 4 fullTrustAssemblies section enables you to explicitly establish a list of assembly identities that will always be granted full trust. The securityPolicy configuration section in the Web.config file contains a child fullTrustAssemblies configuration section. The FullTrustAssembliesSection section is a standard collection that supports add, remove, and clear operations, where you can specify one or more assembly identities that will be granted full trust at run time. The following example shows to configure ASP.NET full trust assembly in the fullTrustAssemblies configuration section.

For Aspose.PDF:
Please visit the link Product Overview for details.

“We have a customer with 2 windows 2012R2 servers with .Net 3.5\2.0 installed. Our application (Windows service using Aspose.Total) will start on one server but not the other. Do you have a diagnostic program we can run to determine why a .Net Core windows service will not start on one of the servers”? It seems to be permissions .

@bns_group,

We need more information regarding the issue. It is difficult to know why service is running on one server and not on other. The easy way is to compare settings of both servers. Please check the settings at your end and update us along with information about what type of license you have?