Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Error with concurrent conversions Options
Endurance
Posted: Monday, May 3, 2021 11:51:04 AM
Rank: Newbie
Groups: Member

Joined: 12/30/2012
Posts: 6
Starting from version EO.Total 21.0.62 I am experiencing the following error when I generate PDF in a multi-thread environment.
I’m using IIS + ASP.NET 4.8 on Windows 2012R2, Windows 2016 and Windows 10 (Visual Studio + IISExpress) and I get the same error.
It happens when I try to convert more than 10 PDF using multiple threads, both with EOWP enabled and disabled.
The latest version that is not affected by this issue is 21.0.32.
It is quite difficult to create a test project (I’m using several web sites to generate the PDF sources and the conversions are both scheduled and on demand), this is the stack trace I get:

in System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
in System.Environment.get_StackTrace()
in EO.Base.BaseException..ctor(String ltr, Exception lts)
in EO.Pdf.HtmlToPdfException..ctor(UInt32 errorCode, String message)
in EO.Pdf.HtmlToPdfException..ctor(String message)
in EO.Internal.wicu.ppmk(axwl bqx, wics& bqy)
in EO.Internal.wicx.mcqj()
in EO.Internal.wicx..ctor(axwl brc, HtmlToPdfOptions brd)
in EO.Pdf.HtmlToPdfSession.ylvi(HtmlToPdfOptions ys)
in EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions yq, HtmlToPdfSession yr)
in EO.Pdf.HtmlToPdfSession.Create(HtmlToPdfOptions options)
in EO.Pdf.HtmlToPdf.yheh.bswv()
in EO.Internal.wicu.iekd[a](ojwd`1 brb)
in EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
in [ … my ASPX.page …]
in System.Web.UI.Control.OnLoad(EventArgs e)
in System.Web.UI.Control.LoadRecursive()
in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
in System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
in System.Web.UI.Page.ProcessRequest()
in System.Web.UI.Page.ProcessRequest(HttpContext context)
in ASP.supporto_generapdfpublishing_aspx.ProcessRequest(HttpContext context) in c:\Users\kalle\AppData\Local\Temp\Temporary ASP.NET Files\vs\f21339c0\5596113f\App_Web_mrdtqsjk.13.cs:riga 0
in System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
in System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
in System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
in System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
in System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
in System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
in System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
in System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
in System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
in System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
in System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Can You help me? Thanks in advance,
Michele
eo_support
Posted: Tuesday, May 4, 2021 9:15:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,858
Hi,

What is the exception message? This would be the value of the Exception class's Message property.

Thanks
Endurance
Posted: Tuesday, May 4, 2021 11:48:33 AM
Rank: Newbie
Groups: Member

Joined: 12/30/2012
Posts: 6
Hi, the exception you see in my first post should contain all the messages (I have just replaced, for clarity, the references to my code with [… my ASPX.page …]).
The message you see in my post is from a "catch (Exception ex)" and is basically the print of ex.ToString(). It should contain the complete stack trace. Please tell me if I can give more detailed information.
Thanks
eo_support
Posted: Tuesday, May 4, 2021 4:15:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,858
Hi,

Please try the wrap your code like this:

Code: C#
try
{
    HtmlToPdf.ConvertHtml(....);
}
catch (HtmlToPdfException ex)
{
    var errorCode = ex.ErrorCode;
    var message = ex.Message;
    ....
}


Please let us know the value of both errorCode and message.

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.