Rank: Newbie Groups: Member
Joined: 4/15/2013 Posts: 5
|
This error occurs only when running on a production server. It functions fine in debug mode on Visual Studio 2010. I did see a topic from earlier this year but I think part of the thread was removed because of something to do with a license key being posted. So some of the information in the thread isn't there. it's an odd situation. I'm using a repeater on the page. When the repeater has one, or sometimes just a few iterations displaying, there is no error. This seems to occur when the repeater is showing greater than five iterations. To be clear, this works with no issue on my debug platform, and only occurs on a production server. The production server is running Win Server 2003 with IIS 6 I'm using eo.pdf.dll version 4,0,60,2
Code: Visual Basic.NET
Protected Sub ASPXToPDF1_BeforeRender(sender As Object, e As System.EventArgs) Handles ASPXToPDF1.BeforeRender
HtmlToPdf.Options.InvisibleElementIds = "pnlPrintable"
HtmlToPdf.Options.VisibleElementIds = "pnl_PDF_Printable"
HtmlToPdf.Options.AutoAdjustForDPI = False
HtmlToPdf.Options.AutoFitX = False
HtmlToPdf.Options.AutoFitY = False
HtmlToPdf.Options.PageSize = New SizeF(8.5F, 11.0F)
HtmlToPdf.Options.OutputArea = New RectangleF(0.0F, 0.0F, 8.5F, 11.0F)
End Sub
The full error is below: This session is no longer valid. If you wish to reuse the session later, please consider calling GetCookies to retain the session cookies, then reuse these cookies through HtmlToPdfOptions.Cookies with another session. (6)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: EO.Pdf.Internal.k4: This session is no longer valid. If you wish to reuse the session later, please consider calling GetCookies to retain the session cookies, then reuse these cookies through HtmlToPdfOptions.Cookies with another session. (6)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[k4: This session is no longer valid. If you wish to reuse the session later, please consider calling GetCookies to retain the session cookies, then reuse these cookies through HtmlToPdfOptions.Cookies with another session. (6)] EO.Pdf.Internal.lr.l() +92 EO.Pdf.Internal.lr.a(a A_0) +139 EO.Pdf.Internal.lr.a(cl A_0) +38 EO.Pdf.HtmlToPdfSession.Dispose() +97 EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) +240 EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc) +7
[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28 EO.Web.Internal.dh.a(String A_0, Object A_1) +78 EO.Web.ASPXToPDF.a(String A_0, Stream A_1) +64 EO.Web.Internal.ms.a(b[] A_0) +52 EO.Web.Internal.a.Close() +30 System.Web.HttpWriter.Filter(Boolean finalFiltering) +184 System.Web.HttpResponse.FilterOutput() +119 System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +52 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, This can happen if for whatever reason the conversion takes a long time. There are many situations that can cause a conversion taking a long time, some of them can be caused by your code, but I would recommend you to check this first: http://www.essentialobjects.com/doc/4/web/troubleshoot.aspxThanks!
|
Rank: Newbie Groups: Member
Joined: 4/15/2013 Posts: 5
|
I read up on the troubleshooting. I don't think those issues are part of the problem because smaller batches of data do run ok. When you say "conversion takes a long time", can you define what "long time" means. The page when running the normal 40 or so iterations inside the repeater control, takes about 10 to 20 seconds or so depending on server load.
I'm still wondering how the control doesn't crash on a local debug platform vs a production server.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I am not sure what else to tell you. There are a lot of things that can cause differences between a dev server and a production server. However the most common differences are network issues and permission issues. I would recommend you to look into IIS logs and Windows event logs to see if you can find any signs.
Thanks!
|