Welcome Guest Search | Active Topics | Sign In | Register

System.Exception: Operation times out issue Options
SarahH
Posted: Friday, January 4, 2013 7:20:20 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2012
Posts: 6
Hi,

I'm wondering if you can help me - I've been using your aspx to pdf converter to take a screen shot of my website page sucessfully on a localhost and also another hostname. I've recently moved the site to a different server and alternative hostname and I am getting timeout issues that I cannot pinpoint.

The error is as follows:

System.Exception: Operation times out.
Generated: Fri, 04 Jan 2013 11:00:29 GMT

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> EO.Pdf.HtmlToPdfException: Convertion failed. Operation times out. ---> System.Exception: Operation times out.
at EO.Pdf.Internal.kl.b(Byte[] A_0, Int32 A_1)
at EO.Pdf.Internal.kl.c(Byte[] A_0, Int32 A_1)
at EO.Pdf.Internal.kr.a(String A_0, Boolean A_1, String A_2)
at EO.Pdf.Internal.kr.a()
--- End of inner exception stack trace ---
at EO.Pdf.HtmlToPdfException.b(Exception A_0)
at EO.Pdf.Internal.kr.a()
at EO.Pdf.Internal.kr.b()
at EO.Pdf.Internal.kr.j()
at EO.Pdf.HtmlToPdf.a(kr A_0)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at EO.Web.Internal.dh.a(String A_0, Object A_1)
at EO.Web.ASPXToPDF.a(String A_0, Stream A_1)
at EO.Web.Internal.mq.a(b[] A_0)
at EO.Web.Internal.mq.a.Close()
at System.Web.HttpWriter.Filter(Boolean finalFiltering)
at System.Web.HttpResponse.FilterOutput()
at System.Web.HttpApplication.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


I am using EO.Pdf.dll version: 3.0.126.2 and EO.Web.dll version: 9.0.50.2 and my code is as follows:

ASPX code:

Code: HTML/ASPX
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
 <eo:ASPXToPDF ID="ASPXToPDF1" runat="server" />


C# Code

Code: C#
EO.Pdf.Runtime.AddLicense("...");

                    ASPXToPDF1.AutoFormsAuthentication = false;

                    ASPXToPDF1.RenderAsPDF(false);

                    ASPXToPDF1.AfterRender += new EventHandler(ASPXToPDF1_AfterRender);


void ASPXToPDF1_AfterRender(object sender, EventArgs e)
        {
            HtmlToPdfResult result = (HtmlToPdfResult)ASPXToPDF1.Result;
            if (result != null )
            {
                using (MemoryStream ms = new MemoryStream())
                {
                    result.PdfDocument.Save(ms);

                    dao.UploadFile( ms.ToArray(), "OnlineForm.pdf");
                }
            }

           
        }


I can find no differences in the resources that this site and the previous site are trying to access. I have tried the following things that have been suggested, which didn't solve this issue:

1) Setting the AutoFormsAuthentication to false
2) This error occurs on the localhost of this server the same as it does with a hostname
3) I've turned any URL redirecting & rewriting off and it didn't make any difference
4) It has the same issue in all browsers


The only diffferences that I can see between these sites is that the current server I think is a is a 32bit Citrix machine rather than windows 64bit and it's running IIS6 rather than 7.

Any assistance would be greatly appreciated
Thanks
Sarah
eo_support
Posted: Friday, January 4, 2013 9:27:29 AM
Rank: Administration
Groups: Administration

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

Please see if this link helps:

http://www.essentialobjects.com/doc/4/web/aspxtopdf.aspx#debug

Thanks!
SarahH
Posted: Friday, January 4, 2013 9:53:53 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2012
Posts: 6
Hi,

Thanks for your message - I've read through this link previously but since my website is loading correctly locally I don't think it applies?

Could you tell me how to change the MaxLoadWaitTime and what the default is? Is there a way to set this in the aspx declaration so that I don't need to recompile all of the c# code and move it over to see if that works?

Thanks
eo_support
Posted: Friday, January 4, 2013 10:00:16 AM
Rank: Administration
Groups: Administration

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

You will need to recompile when you change that setting. You would change it like this:

HtmlToPdf.Options.MaxLoadWaitTime = value;

I suggest you to remove contents from your page piece by piece to see if you can find which piece triggered the problem.

Thanks!
Andy
Posted: Friday, January 4, 2013 12:11:45 PM
Rank: Newbie
Groups: Member

Joined: 2/17/2012
Posts: 6
Just to close this topic - increasing the timeout worked in this case.

Thank you for you help
Sarah
eo_support
Posted: Friday, January 4, 2013 12:13:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
OK. Thanks for the update!


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.