Free Support Forum - aspose.com

Error on setlicense

I am getting an error when trying to apply a new license I ordered for Aspose.Words

Request for the permission of type 'System.Security.Permissions.FileIOPermission,mscorlib, Version=2.0.0.0 ......

The line that errors out is:

license2.SetLicense("Aspose.Words.lic")

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Most likely, your application just does not have permissions to read the license file. That is why to get such exception.

For testing, you can try reading your license file into a Stream and apply license from stream.

Best regards,