"Error: Could not find file 'C:\home\site\wwwroot\font2022.1.13.list'"

Hello Everyone,

I am encountering an issue with my report and need some assistance. When trying to generate the report , I am getting the following error message: "Could not find file 'C:\home\site\wwwroot\font2022.1.13.list'". I have checked the file path mentioned in the error message and confirmed that the file is indeed missing from that location.

I have tried restarting the server and re-uploading the file, but the issue persists. I am using a Windows server and the website is built using ASP.NET. Has anyone experienced a similar issue before or has any suggestions on how to resolve this? I would greatly appreciate any help or insights you can provide.

Note: This occurs only on Azure(Saas environement) also this occurs only for the first time.

Thank you in advance!

Comments

  • Source: TaskFlow-Run Message: Taskflow : ReportGenerator - started

    Task : ReportGeneratorTask | Sequence : 0 - started

    - Exception - System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\font2022.1.13.list'.

    File name: 'C:\home\site\wwwroot\font2022.1.13.list'

      at FastReport.Export.Pdf.PDFExport.GetGlobalFont(Font font)

      at FastReport.Export.Pdf.PDFExport.GetObjFontNumber(Font font)

      at FastReport.Export.Pdf.PDFExport.AddTextObject(TextObject obj, Boolean drawBorder, StringBuilder sb_in)

      at FastReport.Export.Pdf.PDFExport.ExportObj(Base c)

      at FastReport.Export.Pdf.PDFExport.ExportBand(Base band)

      at FastReport.Export.ExportBase.ExportPageNew(Int32 pageNo)

      at FastReport.Export.ExportBase.Export(Report report, Stream stream)

      at FastReport.Report.Export(ExportBase export, Stream stream)

  • Hello!

    When launching an ASP.NET Core / web application:

    Specify a temporary directory for FastReport.Core\FastReport.Net (e.g. Path.GetTempPath()) and web mode:

    using FastReport.Utils;
    
    var frTemp = Path.Combine(Path.GetTempPath(), ‘FastReport’);
    Directory.CreateDirectory(frTemp);
    Config.TempFolder = frTemp;
    Config.WebMode = true;
    

    Additionally, when creating a font cache on Azure, ensure that the process has write permissions to the specified TempFolder, or pre-generate/transfer the fonts to a read-only folder and enable the system cache only in the writable directory.

This discussion has been closed.