Referencing a third party DLL to load "XLSX" from Notes Attachment , And using ILMerge merge DLL.
It fine when isolation is none.
but specify isoation mode to SendBox , I got Error message :
Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
below is the code where error happend.
using System.Data;
using Excel;
DataTable getDataSource(string fileBody)
{
try
{
byte[] result = Convert.FromBase64String(fileBody);
IExcelDataReader excelReader = null;
excelReader = ExcelReaderFactory.CreateOpenXmlReader(new MemoryStream(result));
if (excelReader != null)
{
excelReader.IsFirstRowAsColumnNames = true;
DataSet ds = excelReader.AsDataSet();
excelReader.Close();
if (ds.Tables.Count > 0)
return ds.Tables[0].Copy();
}
return null;
}
catch (Exception ex)
{
logMssage(ex.Message, true);
return null;
}
}
*This post is locked for comments
I have the same question (0)