System.Security.SecurityException:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.FileSystemInfo.get_FullName()
at OfficeOpenXml.ExcelPackage.Save()
at OfficeOpenXml.ExcelPackage.SaveAs(FileInfo file)
at ExcelOnTheWebBusiness.CreateExcelFile.ExcelFile.SaveAsExcelFile(DataTable result, DataTable fileNameinExcelFile, DataTable filter, String fileName, String sheetName, Boolean includeFreezePane, Boolean compressFile, ExcelPropertiesData excelPropertiesData)
in C:\Projects\SEGOT-VLCApplications\ExcelOnTheWeb\Development\ExcelOnTheWebBusiness\CreateExcelFile\CreateExcelFile.cs:line 567
at ExcelOnTheWebBusiness.CreateExcelFile.ExcelFile.Create(CreateExcelInputData createExcelInputData, ExcelPropertiesData excelPropertiesData)
in C:\Projects\SEGOT-VLCApplications\ExcelOnTheWeb\Development\ExcelOnTheWebBusiness\CreateExcelFile\CreateExcelFile.cs:line 140
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:
The demand was for:
The granted set of the failing assembly was:
The assembly or AppDomain that failed was:
EPPlus, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1
The method that caused the failure was:
Void Save()
The Zone of the assembly that failed was:
Internet
The Url of the assembly that failed was:
file:///D:/APPS/eow.gto.volvo.net/WebRoot/bin/EPPlus.DLL
Was solved by:Click on button Unblock on the properties window for the file in question: