Free Support Forum - aspose.com

Security Exception reading license file with Vista

I recently upgraded to Vista Business from XP Pro. Prior to the upgrade I never had any problems with my web apps reading the Aspose license files. Post Vista upgrade I am now receiving a "Security Exception" from my web app running locally on my machine. Below is the error message. Can you help me resolve this?

Thanks!

Dan

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

Line 7:      Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad
Line 8:          Dim lic As New aCells.License
Line 9:          lic.SetLicense("Aspose.Total.lic")
Line 10: 
Line 11:         Dim report As New ValentineReports

Source File: c:\inetpub\wwwroot\ECI\ValentinesDay\admin\Reports\TableAssignements.aspx.vb Line: 9

Stack Trace:

[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() +58
   System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
   System.Reflection.Assembly.get_CodeBase() +35
   Aspose.Cells.x220f433da4115056.x9b6c749de2abbbfb(Assembly xd3764619ec304ff0) +25
   Aspose.Cells.x220f433da4115056.xde6236852622c268(String x1c1fc72fe1a3b4ea, Assembly x39e0a96279c40baa) +67
   Aspose.Cells.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4) +125
   Aspose.Cells.License.SetLicense(String licenseName) +84
   Admin_Reports_TableAssignements.Page_PreLoad(Object sender, EventArgs e) in c:\inetpub\wwwroot\ECI\ValentinesDay\admin\Reports\TableAssignements.aspx.vb:9
   System.Web.UI.Page.OnPreLoad(EventArgs e) +111
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.admin_reports_tableassignements_aspx.ProcessRequest(HttpContext context) +37
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

Hi,

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(....)

I think you need to modify the proper security settings for your requirements. You may try to assign Administrative role for your web application.

Thank you.

Hi,
Did you finally found a solution for this issue?
Regards

Hi,

I have logged this issue in our database. Development team will look into it. Once we will get any update, we will let you know.

This issue has been logged as CELLSNET-28433.

Hi,

Please assign administrative role to your web application.