I tryed also your sample code, but I had the same error ... at the end I chenge trust configuration in web.config file and it seems to work !
Thanks again
Stefano
I tryed also your sample code, but I had the same error ... at the end I chenge trust configuration in web.config file and it seems to work !
Thanks again
Stefano
Hi,
Thanks again for your support!
Regards
Stefano
I’m having issue with running aspose.cell 8.5.2 from the .net2.0 folder under Medium Trust.
[SecurityException: That assembly does not allow partially trusted callers.]
CommandPilot2009.apps.RMIS.ExcelGen.Page_Load(Object sender, EventArgs e) in c:\www\CommandPilot\1.0.1\Inetpub\wwwroot\CommandPilot2009\apps\RMIS\ExcelGen.aspx.cs:175
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
Hi,
Thanks for your posting and considering Aspose.Cells.
It seems your issue is occurring because of partial trust. If you will use Aspose.Cells in full trust, then it should resolve your exception.
Please see this documentation article that talks about partial/full trust issue of Aspose.Cells and should help you in solving this issue.
( Declaration|Documentation )
I have tried using the example in the link to get it to work under Medium trust but it doesn’t work. When it tries to open the page with the Aspose.Cells reference, it errors out right away and doesn’t even give me the changes to step through. I’m also trying to add the Aspose.Cells.dll to the web.config to grant it full trust like I’m trying with Aspose.PDF.
Hi,
Thanks for using Aspose.Cells.
Could you please try putting/installing your Aspose.Cells and Aspose.Pdf assemblies in GAC (Global Assembly Cache). If I am not mistaken, when you will put/install these assemblies in GAC, they will automatically get a full trust permissions and it will fix your issue.
I added the Aspose.Cells and Aspose.PDF to the GAC and still have the same problem.
I’ve attached one of the example that was posted to the forum to try to run it in Medium trust and it failed also.
I also tried the example for Aspose.Cells from GitHub and it also fail to load under Medium Trust.
Hi,
Thanks for your posting and using Aspose.Cells.
We will look into this issue further and evaluate Aspose.Cells in medium trust level as per instructions and see how it goes and update you asap.
( Declaration|Documentation )
Hi,
Thanks for using Aspose.Cells.
I am still working on this issue. So far I have prepared the environment with Windows 7 - 64 bit, IIS, ASP.NET 4.0 and Visual Studio 2013.
Could you please provide me the simple one page web application with few lines of code that runs on Full-Trust and does not run on the Medium-Trust and screenshots to configure them on the IIS and the web.config settings related to Full/Medium Trust levels. These things will help me carry out the investigations further. Thanks for your cooperation.
I have attached the screenshots of my environment for your reference.
Hi,
Thanks for using 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.
Please check these statements from the following article
( https://msdn.microsoft.com/en-us/library/wyts434y.aspx
)
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.
Hi,
Thanks for using Aspose.Cells.
We were able to replicate this issue by running your web application on IIS server. When the following setting in Web.config is used (i.e full trust), it runs fine
but when the following setting is used (i.e medium trust), it throws exception
I have attached the screenshots for a reference.
The code inside your web form is exactly same as mentioned in this article so it should be running fine but unfortunately it is not working.
( http://www.aspose.com/docs/display/cellsnet/Declaration )
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
Hi,
Thank you for the information. Hopefully we’ll hear back from you guys soon with a fix.
Hi,
Thanks for your using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v8.5.2.4 and let us know your feedback.
Thank you for getting back on the fix. I was able to use the latest version under medium trust. I updated the reference to Aspose.Cells and was able to generate the Excel report without having to make any code changes.
Hi,
Thanks for sharing good news with us and using Aspose.Cells.
We are pleased to know that your issue is finally resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.
The issues you have found earlier (filed as CELLSNET-43869) have been fixed in this update.