Welcome Guest Search | Active Topics | Sign In | Register

ASPXToPDF.RenderAsPDF does not work in production environment in Aazure Options
RyzeXing
Posted: Monday, December 23, 2019 11:12:42 AM
Rank: Newbie
Groups: Member

Joined: 11/18/2019
Posts: 3
Hi Support team,

We used EO library for a long time. Recently, we just updated our key and add some new stuffs to print our aspx page. Everything works well locally as well as in our Azure staging environment. But we release our stuff to production and when you clicked the button and try to print the page. It will take a long time to respond and return 502 server error.

502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

Any suggestions on this? All the old code(long time ago) with ASPXToPDF also will cause the same issue now on production environment. Please Advise asap.

eo_support
Posted: Monday, December 23, 2019 3:34:16 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Can you try some test code like this without using ASPXToPDF at all (try in a page without ASPXToPDF control):

Code: C#
PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertHtml("test", doc);


If this works, it means the HTML to PDF converter is working properly and the problem is in ASPXToPDF part.

Thanks!
RyzeXing
Posted: Thursday, December 26, 2019 10:44:45 AM
Rank: Newbie
Groups: Member

Joined: 11/18/2019
Posts: 3
Hi support team,

The part of the issue confuses me the most is everything works well locally as well as in Azure staging environment. Once it is deployed to production, it will take 3 mins, timeout and break application. Here are some exception information. Hope it can help locate the issue...

Message Exception has been thrown by the target of an invocation. Child process not ready.
Exception type EO.Internal.i3+e
System.Reflection.TargetInvocationException:
at System.RuntimeMethodHandle.InvokeMethod (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Reflection.RuntimeMethodInfo.Invoke (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at EO.Internal.arz.a (EO.Web, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Web.ASPXToPDF.a (EO.Web, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.z6.a (EO.Web, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at System.Web.HttpWriter.FilterIntegrated (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Web.HttpResponse.FilterOutput (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Web.HttpApplication+CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Web.HttpApplication+<>c__DisplayClass285_0.<ExecuteStepImpl>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Web.HttpApplication.ExecuteStepImpl (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Web.HttpApplication.ExecuteStep (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
Inner exception EO.Internal.i3+e handled at System.RuntimeMethodHandle.InvokeMethod:
at EO.Internal.i3.a (EO.Base, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.i3.a (EO.Base, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.i3.a (EO.Base, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.i3.a (EO.Base, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.at6.b (EO.WebEngine, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.pf.a (EO.Base, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.WebEngine.Engine.Start (EO.WebEngine, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.ru.b (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.mw.a (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.aj9.a (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.ob.e (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.ob..ctor (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Pdf.HtmlToPdfSession.a (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Pdf.HtmlToPdfSession..ctor (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Pdf.HtmlToPdf+d.a (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Internal.aj9.a (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Pdf.HtmlToPdf.ConvertHtml (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
at EO.Pdf.HtmlToPdf.ConvertHtml (EO.Pdf, Version=19.2.91.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc)
eo_support
Posted: Thursday, January 2, 2020 9:55:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Have you tried to enable EO Worker process? See here for more details:

https://www.essentialobjects.com/doc/common/eowp.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.