License Permissions

Hi Aspose folks,

I’ve been using aspose.cells for my application for a number of years and I’ve set the application up on a new server connected to our network. I’ve registered the aspose.cells.dll using regasm in the folder C:\Windows\Microsoft.NET\Framework\v2.0.50727 as I have done on previous servers but I get a file permissions error regarding the license as shown in the attached image (System.Security.Permissions.FileIOPermission, mscorlib version=2.0.0.0) . Can you help?

Thanks,

Lee

Hi,


Well, we think the issue (as the exception suggests) may not be related to Aspose.Cells component by any means. The issue is more related to 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 APIs, 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 on the new server. You may try to assign Administrative role for your applications or projects on your server.

Thank you

Hi Amjad,

As far as I can see I have set full permissions for IIS_USRS on the licence file and all relevant folders for the application as shown in the attached. As far as I can see all IIS settings on the new computer/Server are the same as those on my laptop where I am successfully running the application.

I am using version 6.0.0.2 of the Aspose.Cells.dll because I couldn’t get my application to work with a later version (see thread Using COM interop. Excel SUMIFS Function Issue)



Also, I don’t know how to try opening a file using filestream to test permissions directly for the license file!



Can you suggest anything else that I might try?

Thanks,



Lee

Hi,


Well, your issue is surely caused by security permission sets for the IO operation as per your mentioned stack trace and nothing to do with Aspose.Cells APIs. We also request you to kindly update to latest versions (e.g Aspose.Cells for .NET v8.3.1) of the product.

For your information, Aspose.Cells may not work well on medium or partial trust environment with limited permissions set, see the document for your reference: http://www.aspose.com/docs/display/cellsnet/Declaration

You may also try to browse internet on your issue to sort it out and for confirmation:
e.g
https://closedxml.codeplex.com/workitem/8770
https://social.msdn.microsoft.com/Forums/vstudio/en-US/f7031de3-fa5a-45c1-8518-25cad7653444/request-for-the-permission-of-type-systemsecuritypermissionssecuritypermission-mscorlib?forum=netfxbcl
http://stackoverflow.com/questions/8470216/system-security-securityexception-request-for-the-permission-of-type-system-se


Thank you.

Hi Amjad, I’ve pretty much exhausted that list now and I still got the error. I’ve just loaded the latest version of the aspose.cells.dll and I now get the attached error. Can you help?

Thanks,

Lee

Hi,


Well, I am afraid, to use latest versions of the product, you have to renew your subscription as you cannot use any version that is released after your subscription expiry date as per the error message. I think you may either comment out the licensing code to check if it works fine for your rest of code or you may post a request for 30 days temporary license here:
http://www.aspose.com/corporate/purchase/temporary-license.aspx

Thank you.

Hi Amjad,
The app no longer shows the license so it must be to do with how the dll is registered. Also,
My subscription is up to date (due in June 2015 again) and I am fully paid up. The reason I can’t use the latest version of the dll and license is because of an unresolved problem with my app as discussed in Using COM interop. Excel SUMIFS Function Issue)

The error is The parameter is incorrect @Do objCell.putValue_5(!(!BookActions.Value[j]))

I discussed this in the previous thread in 2012 (link above). So my choice is to use version 6.0.0.2 with an earlier license or keep getting this error. Can you suggest how I might get around this error with the new dll and license because I was unable to resolve the issue before.
We tried Replace

                                @Do objCell.putValue_5(!(!BookActions.Value[j]))

With

                                @Do objCell.putValue_5(!(!BookActions.Value[j]), ‘true’)    or

                                @Do objCell.putValue_5(!(!BookActions.Value[j]), ‘True’)     or

                                @Do objCell.putValue_5(!(!BookActions.Value[j]), ‘TRUE’)     or 

                                @Do objCell.putValue_5(!(!BookActions.Value[j]), TRUE)                     i.e. without quotes.

Looks like @Do objCell.putValue_5(!(!BookActions.Value[j]), ‘false’) works for this string value issue. However, it’s thrown up another issue throughout the application. Any thoughts?

Thanks,
Lee

Hi,


Could you try to use the following with new versions of Aspose.Cells for .NET if it works fine:
@Do objCell.putValue_6(!(!BookActions.Value[j]), true)

Thank you.

Hi Amjad,
Unfortunately I get the following error:-

Error : Invalid index value @Do objCell.putValue_6(!(!BookActions.Value[j]), true)

I changed the value to false to try it but it still failed. Is there anything else that I can try?

Thanks,
Lee

Hi,


It looks like your issue is with the data for the object\ item “BookActions.Value[j]” specified as parameter in the PutValue method, so you should debug it and fix it on your end accordingly. Could you try with the simplest data separately in some form/ page if it works fine:
e.g
Sample code:
@Do objCell.putValue_6(“123”, true);

Thank you.