Rank: Member Groups: Member
Joined: 2/21/2013 Posts: 12
|
Hi - we are getting this error inconsistently. This is running on web farm environment. We are unable to reproduce until issue occurs then every PDF export we attempt on the website will get this error going forward. Rebooting the server that hosts IIS will resolve this issue which is our current workaround.
Thanks, Chris
using (MemoryStream stream = new MemoryStream()) { ***ISSUE HERE*** -> HtmlToPdfResult pdfResult = HtmlToPdf.ConvertHtml(report_html_string, stream);
// if file already exists on server delete before recreating if (System.IO.File.Exists(filePath)) System.IO.File.Delete(filePath);
using (var fileStream = System.IO.File.Create(filePath)) { pdfResult.PdfDocument.Save(fileStream); } }
PDF Export Exception: System.Exception: Failed to create child process, Win32 Error: 5 at EO.Internal.jn.a(Exception A_0, Boolean A_1) at EO.Internal.jn.a(Int32 A_0, String A_1, Boolean A_2) at EO.Internal.jn.b(String A_0, Boolean A_1) at EO.Internal.jn.f..ctor(jn A_0, String A_1, String A_2) at EO.Internal.jn.a(j A_0, azz A_1, String A_2, String A_3) at EO.Internal.jn.a(Boolean& A_0, a9v[] A_1, String A_2, String A_3) at EO.Internal.jn.a(a9v[] A_0, String A_1, String A_2) at EO.Internal.aqb.a(String A_0, String A_1) at EO.Internal.av2.b() at EO.Internal.av2.a(WindowsIdentity A_0) at EO.WebEngine.Engine.Start(WindowsIdentity user) at EO.Internal.sy.b() at EO.Internal.np.a(sy& A_0) at EO.Internal.alv.a(av A_0, sy& A_1) at EO.Internal.pa..ctor(av A_0, HtmlToPdfOptions A_1) at EO.Pdf.HtmlToPdfSession.a(HtmlToPdfOptions A_0) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0, Boolean A_1) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream) at PortalController.ExportReportPackageToPDF() in c:\projects\production\portal\Controllers\PortalController.cs:line 1003 stackTrace
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi, Error code 5 is access denied. This usually occurs when you have another application/service that locks the file. You can try to enable EO worker process and see if it resolves the issue for you: https://www.essentialobjects.com/doc/common/eowp.aspxFor an ASP.NET application, you can copy eowp.exe into your application's bin folder, or place it somewhere else on your system but your application has read/execute permission to it. If you place it at a different location, you would need to call this method in your application to inform our library where it is: https://www.essentialobjects.com/doc/eo.base.runtime.initworkerprocessexecutable.aspxPlease let us know if this resolves the issue for you. Thanks!
|