Welcome Guest Search | Active Topics | Sign In | Register

Problem with ASPXtoPDF when deployed on server Options
MSAT
Posted: Friday, December 2, 2011 1:32:44 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2011
Posts: 7
Hello,

ASPXtoPDF is creating document as expected on Development machine. However when deployed to server, the PDF document is missing stylesheets and images. When I logged into the server and ran the application from the server, PDF document is correct.

Can you please help? Let me know if any additional details are required. Thanks.

MSAT team
eo_support
Posted: Friday, December 2, 2011 8:52:56 AM
Rank: Administration
Groups: Administration

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

Please try to login into your server, then use exactly the same Url to access your application locally as you would remotely and see if your page renders correctly. For example, if you were accessing your application from outside with Url "www.yourapp.com/page1.aspx", then you uses the same Url to access your app locally from your server. This is how ASPXToPDF converter accesses your server. That can fail if your DNS configuration cannot correctly resolve the hostname on the server itself.

Thanks!
MSAT
Posted: Friday, December 23, 2011 2:33:24 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2011
Posts: 7
Hello,

We are not sure we understand what is meant by 'DNS configuration not correctly reslove the host name on server itself' in the reply post above.

Just to recap, we have implemented EO’s ASPXtoPDF converter in our web application. When we access the functionality on the web server we are able to see the expected result (i.e. the contents of the page are returned as a pdf correctly). However, when we access the same functionality through the url / public IP, we are not getting the expected result. We have tried to use the base url as ‘/’ and still not getting the desired functionality.

Please advice.
eo_support
Posted: Friday, December 23, 2011 7:38:48 AM
Rank: Administration
Groups: Administration

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

What if you try to access the site through public IP on your web server? Does it work?

Thanks
MSAT
Posted: Sunday, December 25, 2011 3:40:50 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2011
Posts: 7
No, it does not work if we login to server and access the the site through public IP.
eo_support
Posted: Monday, December 26, 2011 7:52:25 AM
Rank: Administration
Groups: Administration

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

This is exactly the problem. We have updated our documentation that explains this in detail:

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

Look for "Troubleshooting ASPX to PDF" in the topic.

Thanks!
MSAT
Posted: Tuesday, January 3, 2012 5:42:12 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2011
Posts: 7
Thanks. Documentation was very helpful and we were able to configure the server. Now the original issue with APTXtoPDF is resolved.

However, still we are facing one problem when we moved the application to HTTPS. Here are the errors we receive when we try to open the PDF using HTTPS application-

I must add that HTMLtoPDF is working perfectly fine on HTTPS application. The issue is only with ASPXtoPDF part of the application. Please help.

File does not exist. - at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response) at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Exception has been thrown by the target of an invocation. - at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& 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 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at EO.Web.ASPXToPDF.a(Object A_0, String A_1, String A_2) at EO.Web.Internal.mb.a(HttpResponse A_0, String A_1) at EO.Web.Internal.iu.a(HtmlTextWriter A_0, Control A_1) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
eo_support
Posted: Tuesday, January 3, 2012 9:33:52 AM
Rank: Administration
Groups: Administration

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

You may want to check your Web server log to see why it can not find which file. There really isn't much difference on our side in terms of http or https except that these are two different protocols. Once the connection is established, we request the file from your web server --- regardless whether the connection is a http or a https connection. How your web server correctly serves the file over http, but refuses to serve the file over https would be something that you need to find out from your Web server.

Thanks!
MSAT
Posted: Wednesday, January 4, 2012 6:40:28 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2011
Posts: 7
Hi,
After digging more deep into the issue, we are getting the below error. Can you please have a look and point us into some direction-

Server Error in '/' Application.


Operation times out.
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: System.Exception: Operation times out.

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:


[Exception: Operation times out.]
EO.Pdf.Internal.j6.c(Byte[] A_0, Int32 A_1) +323
EO.Pdf.Internal.kb.a(String A_0, Boolean A_1, String A_2) +397
EO.Pdf.Internal.kb.a() +525

[HtmlToPdfException: Convertion failed. Operation times out.]
EO.Pdf.HtmlToPdfException.b(Exception A_0) +72
EO.Pdf.Internal.kb.a() +2033
EO.Pdf.HtmlToPdf.a(kb A_0) +28

[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.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +640
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
EO.Web.ASPXToPDF.a(Object A_0, String A_1, String A_2) +615
EO.Web.Internal.mb.a(HttpResponse A_0, String A_1) +84
EO.Web.Internal.iu.a(HtmlTextWriter A_0, Control A_1) +362
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290





Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
eo_support
Posted: Wednesday, January 4, 2012 10:49:11 AM
Rank: Administration
Groups: Administration

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

This would look like the same problem as the original DNS error. When the connection can not be established, you get a time out error.

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.