|
Hi,
These
are the steps required
to
run in
EPPLus in medium trust (tested with EPPlus 2.8.0.1)
1) Download the sourcecode and open in visual studio 2008 the solutions. Locate and open the file
ExcelPackage.cs in EPPlus project
2) At line 300 and at line 339 comment all the catch expression
//if (password == null && EncryptedPackageHandler.StgIsStorageFile(template.FullName)==0)
//{
// throw new Exception("Can not open the package. Package is an OLE compound document. If this is an encrypted package, please
supply the password", ex);
//}
//else
//{
// throw (ex);
//}
3) Open the file AssemblyInfo.cs located in EPPlus/Properties and add the following line after [assembly: ComVisible(false)]
[assembly: AllowPartiallyTrustedCallers]
4) Compile the solution and take the builded EPPLus.dll
5) On the web.config add the following line in the <assemblies> section:
<add assembly="EPPlus, Version=2.8.0.1, Culture=Neutral, PublicKeyToken=ea159fdaa78159a1" />
That's all.
Good work, Ivano
|