Morning Guys,
I am having a real night mare trying to get Aspose to work on our web server.
I have inserted the .lic file in the bin folder and inserted the license file as an embedded resource.
I have also used the code that is contained within the license document to set the license i.e
// Licence Aspose.Cells to prevent evaluation message
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(“Aspose.Cells.lic”);
We are running version 5.2.0.
The solution that is referencing the Apose Cells assembly is a C# .NET web solution based on the 3.5 framework.
I have been at this company for two months when I joined they only had one Aspose developer licence but have now purchased two inclusive of one for me. The licence is actually for the latest version of Aspose however since I do not wish to upgrade to the latest version at this stage having already performed an upgrade from 1.1 framework to 2.0 and then 3.5 framework of this solution. I still wish to keep using the 5.2.0 version of the control.
My first question is will the latest licence still work with the old version of the assembly?
Are there any framework issues with 5.2.0, this runs perfectly on my machine but I get licence issues on the web server.
I have looked through the documentation, and followed everything to the letter and are now running out of ideas.
The exception which gets thrown is shown below:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +61
System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
System.Reflection.Assembly.get_CodeBase() +35
ॾ.⡟.⡾(Assembly ⡿) +25
ॾ.⡟.⡼(String ⡯, Assembly ⡽) +67
ॾ.⡟.⡮(String ⡯, Assembly ⡰) +125
Aspose.Cells.License.SetLicense(String licenseName) +89
|
Assistance on this would be gratefully received.
Update we are running IIS 7.0 on a windows server 2008 r2 I have checked the permissions on the license file and cannot see anything that leaps out at me.
Let me know your thoughts.
Many Thanks,
Hi,
Thanks for providing us some details.
Well, I think the issue may be security permission sets for the IO operation, I think you are not allowed to access the file system completely. To confirm this exception, you may try to run the code to open the file without involving Aspose.Cells, e.g…, FileStream fs = File.Open(…), could you run this simple .NET APIs codes on the server? I think you need to modify the proper security settings for your requirements. You may try to assign Administrative role for your web application or project on your server.
PS. Since you are using some older version of the product i.e. v5.2.0 for which I am not entirely certain about it, also we cannot help much if there was some sort of issue regarding frameworks or not. Moreover, latest licenses may work with older versions of the product. We still recommend you to kindly upgrade to latest version of the product. Over the years we have made tremendous enhancements regarding MS Excel (97-2007/2010) file formats and its conversions, we include lots of new features and enhanced existing features to make the component more robust and feature rich APIs.
Thank you.