I receive the following error while trying to create a new Excel object:
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
Line 26: 'Put user code to initialize the page here
Source File: \\\\WebForm1.aspx.vb Line: 28
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
The web server for the site has a virtual directory that is pointed to a file share on another machine, so all of the site's files are stored on a different machine than the web server. I can fix the problem by adjusting the .Net runtime trust level for the site, but the site is being developed for a government agency with strict security guidelines and the trust level or file permissions cannot be adjusted on the government's servers.
I am also using the Aspose.Words.Document and Aspose.PowerPoint.Presentation objects. I can successfully create a new Document object (using its contructor that takes no arguments). To instantiate a Presentation object (which does not have a constructor that takes no arguments), I must pass in a FileStream object that points to a template file (I get another permissions error if I try to pass in a file path via a string). Since there is only one constructor for the Excel object (which takes no arguments), I cannot use the beforementioned method.
I'm using the newest version of the Cells assembly at the time of this writing (126.96.36.199), and have also duplicated this error by trying to instantiate an Aspose.Excel.Excel object (assembly version 188.8.131.52).