Base solution for your next web application
Open Closed

Export to Excel not working on AWS Linux #4341


User avatar
0
ideazco created

Hi,

We are using ASP.net core + Angular version 4.5.0.0 and we hosted the application on AWS Linux EC2 instance.

When we export audit logs to excel it gave an error as belowed.

Please help us to resovle this issue as soon as posible. Thanks

ERROR 2017-12-13 07:46:55,923 [6 ] Mvc.ExceptionHandling.AbpExceptionFilter - The type initializer for 'System.Drawing.GDIPlus' threw an exception. System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'gdiplus': The specified module or one of its dependencies could not be found. (Exception from HRESULT: 0x8007007E) at System.Drawing.GDIPlus.GdiplusStartup(UInt64& token, GdiplusStartupInput& input, GdiplusStartupOutput& output) at System.Drawing.GDIPlus..cctor() --- End of inner exception stack trace --- at System.Drawing.GDIPlus.GdipGetGenericFontFamilySansSerif(IntPtr& fontFamily) at System.Drawing.FontFamily..ctor(GenericFontFamilies genericFamily) at System.Drawing.FontFamily.get_GenericSansSerif() at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical) at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth) at ideazco.ideazco.Auditing.Exporting.AuditLogListExcelExporter.<>c__DisplayClass3_0.<ExportToFile>b__0(ExcelPackage excelPackage) in D:\Projects\IdeazCo\ideazco\aspnet-core\src\ideazco.ideazco.Application\Auditing\Exporting\AuditLogListExcelExporter.cs:line 66 at ideazco.ideazco.DataExporting.Excel.EpPlus.EpPlusExcelExporterBase.CreateExcelPackage(String fileName, Action`1 creator) in D:\Projects\IdeazCo\ideazco\aspnet-core\src\ideazco.ideazco.Application\DataExporting\Excel\EpPlus\EpPlusExcelExporterBase.cs:line 29 at ideazco.ideazco.Auditing.AuditLogAppService.


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you try to apply offered solution here <a class="postlink" href="https://github.com/VahidN/EPPlus.Core/issues/16">https://github.com/VahidN/EPPlus.Core/issues/16</a> ?

  • User Avatar
    0
    ideazco created

    Hi,

    After installing 'gdiplus', we follows below link, then it's resvle the issue...

    [https://en.code-bude.net/2017/05/08/net-core-gdiplus-dll-not-found-in-linux/comment-page-1/#comment-119157])

    Thanks