Welcome Guest Search | Active Topics | Sign In | Register

On error has occured... Options
ntkk
Posted: Thursday, September 1, 2011 9:05:53 AM
Rank: Newbie
Groups: Member

Joined: 9/1/2011
Posts: 2
Hello,

This is my first post to this support forum as I'm evaluating if this is the right pdf create module for us. I'm using the eo.pdf.dll to do conversion from html to pdf in my testing environment with some errors. Locally on my Windows 7 machine I can't reproduce the error and everything is working OK.

The error logged in my CMS log file on Windows 2008 R2, with IIS 7.5 is:

3268 11:54:22 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.layouts_htc_floorsystems_pagelayoutprint_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: EO.Pdf.HtmlToPdfException
Message: Failed to convert Url 'http://www.htc-floorsystems.com/en/Products/DustExtractors/HTC15iAD.aspx?p=1&pdf=1'.(1007:Failed to connect the remote server.)
Source: EO.Pdf
at EO.Pdf.HtmlToPdfException.b(Exception A_0)
at EO.Pdf.Internal.j2.h()
at EO.Pdf.HtmlToPdf.a(j2 A_0)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc)
at HTC.Sitecore.Website.layouts.HTC.Globals.PageDesign.ProductDetails.eoConvertURLToPDF()
at HTC.Sitecore.Website.layouts.HTC.Globals.PageDesign.ProductDetails.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

On the web page following information is displayed: On error has occured...

I will gladly provide more information if needed.

Best regards,
Niklas
eo_support
Posted: Thursday, September 1, 2011 9:17:57 AM
Rank: Administration
Groups: Administration

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

The error message means that your Web application cannot connect to "www.htc-floorsystems.com". This is usually a network configuration problem. For example, "www.htc-floorsystems.com" is configured to point to a different server that does not exist. You can try to write some test code that uses System.Net.WebRequest to access the same Url and see if that fails. If that also fail, then it's almost certain a network issue. Once you fix the network problem, the converter should work fine for you.

Thanks!
ntkk
Posted: Thursday, September 1, 2011 9:29:34 AM
Rank: Newbie
Groups: Member

Joined: 9/1/2011
Posts: 2
You can actually try this url for your self and see that, that's not the case...

http://www.htc-floorsystems.com/en/Products/GrindingMachines/HTC650RX.aspx
this is the default page and is working
http://www.htc-floorsystems.com/en/Products/GrindingMachines/HTC650RX.aspx?p=1
this is the pdf version of the page and gives error
http://www.htc-floorsystems.com/en/Products/GrindingMachines/HTC650RX.aspx?p=1&pdf=1
this is the pdf version of the page but in html format and is working.

You can add the p=1 and p=1&pdf=1 to any product page and see that all of them fail. This does not happen on my local machine.

When this problem is resolved, we can buy this product and enable the pdf generation on our website.

Best regards,
Niklas
eo_support
Posted: Thursday, September 1, 2011 9:37:17 AM
Rank: Administration
Groups: Administration

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

You and me can access that Url DOES NOT mean your WEB APPLICATION can access that Url.

Let's say your www.htc-floorsystems.com is on machine A. your ASP.NET application is on machine B, your development machine is on machine C, and our machine is machine D, then,

Case #1. C <-----> A OK
Case #2. D <-----> A OK
Case #3. B <-----> A NOT OK!

You've only tested case 1 and 2. Case 3 is where the problem is. Try write some test code to run it on your server and you will see. Error code 1007 means "Failed to connect to host or proxy".

Thanks
scm
Posted: Friday, March 2, 2012 6:47:35 PM
Rank: Newbie
Groups: Member

Joined: 12/12/2011
Posts: 3
Please Help.

I am also having this issue: Failed to convert Url '...'.(1007:Failed to connect the remote server.)

HtmlToPDF works fine on my local machine or across my internal network but will not work remotely. This has only started occurring since I updated from ASP.Net 3.5 to 4.0.

My IIS Application Pool Identity is set to NetworkService and I have also given Network Service permission to Read/Write/Modify (Full Access) my site folder.

Is there any other permissions I have to give? Is this an issue with changing from ASP.Net 3.5 to 4.0?
eo_support
Posted: Friday, March 2, 2012 6:53:17 PM
Rank: Administration
Groups: Administration

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

We are not aware of any issue particularly related to switching version from ASP.NET 3.5 to ASP.NET 4.0. This would simply look like an issue where your application does not have network access.

Thanks!
scm
Posted: Tuesday, March 6, 2012 2:13:03 PM
Rank: Newbie
Groups: Member

Joined: 12/12/2011
Posts: 3
eo_support wrote:
Hi,

We are not aware of any issue particularly related to switching version from ASP.NET 3.5 to ASP.NET 4.0. This would simply look like an issue where your application does not have network access.

Thanks!


I agree, it's not a 4.0 issue. I have now tested both 3.5 and 4.0 on my new server and neither are working.

I have purchased both EO.PDF and EO.Web.AjaxUpload, and so I feel I deserve a little more in the way of Support than the answer you've just provided me.

Here is the scenario: I have just setup a new Test Server on which I want to test my site before moving it to my Live Server. I am running Windows 2008 R2 and IIS 7 (an identical setup to my Live Server).

I have created an Application Pool with Identity of NetworkService.
I have given Read/Write/Modify permissions for my website folder to NetworkService using Windows Explorer. (In fact I have also tried giving Read/Write/Modify permissions to Everyone but this did not help either)

EO.PDF HtmlToPDF works on my local machine but not my Test Server. I am using many other third party tools e.g. iTextSharp/SharpZip/SyncFusion, all of which require Permission to write temp files to my Test Server website folder and All of which are working perfectly.

Can you please explain what other Permissions EO.PDF requires?
Can you please explain how I can give these Permissions?
Can you please explain what User EO.PDF acts as when HtmlToPdf is in progress, if it is not NetworkService as I have set in IIS?

Can you please provide any and all other information that you feel might help me fix this issue and get back to using your otherwise excellent product?

Thanks.
eo_support
Posted: Tuesday, March 6, 2012 2:35:09 PM
Rank: Administration
Groups: Administration

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

You have to understand what we do and what we do not do here. As to your questions:

Can you please explain what other Permissions EO.PDF requires?

There are .NET permissions and Windows permissions. As to .NET permissions, EO.Pdf requires unmanaged code permission. As to Windows permissions, EO.Pdf requires network permission, read permission to your windows system directory and write permission to your temp directory (normally it does not use temp file but if the file to be converted is too large and the system memory is low then it will try to dump some data into temp file).

Can you please explain how I can give these Permissions?

This is something that is both beyond the scope of our support and beyond the scope of our expertise. We are not system administrators, so we can not help you on that. We can however help you to pinpoint exactly what permission is failing. For example, if you can open up your server to us so that we can investigate on your server, then we should be able to track down to something like "it fails because it can not read file X" or "it fails because it can not open a TCP connection to host Y". We will neither investigate why those condition exists on your system nor be able to tell you how to fix those conditions. This is like if you bought a TV but it doesn't turn on and the TV vendor tracked it down to the fact that you wall outlet does not have power. In that case the TV vendor will not go further to fix your power outlet.

Can you please explain what User EO.PDF acts as when HtmlToPdf is in progress, if it is not NetworkService as I have set in IIS?

EO.Pdf runs inside your Web application, thus runs under whatever user context your IIS application pool is set to run. It does not (and can not) switch to any other user context.

To sum it up, if it is a configuration issue related to your environment, then we can help you to track down or verify what is causing the problem for you; But we can not help you fixing such configuration issues. You will have to fix that yourself. Of course, if it turns out to be an issue on our side, then we will investigate further and see if we can come up a solution/fix for you.

In your case, I would suggest you try to write some test code to connect to the problem server/Url and see if your test code can get that page. If even your test code can't get that page, then it's obviously a configuration issue somewhere and you will need to resolve that yourself. If your test code works fine, then we will need to be able to access your server remotely so that we can investigate further on your server.

Hope this helps. Let us know if there is anything else.

Thanks!


scm
Posted: Tuesday, March 6, 2012 3:27:25 PM
Rank: Newbie
Groups: Member

Joined: 12/12/2011
Posts: 3
Thanks for the quick response.

I can access the Test Server Url successfully from any system. I can provide this Url to you via PM if you wish.

Please PM me to advise how I can setup my server to allow you access.
eo_support
Posted: Tuesday, March 6, 2012 3:35:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
scm wrote:
I can access the Test Server Url successfully from any system. I can provide this Url to you via PM if you wish


You need to write test code to run inside your application to access the Url you are trying to convert. You can access the Url from any system does not mean you can access that Url from your web application. That's whole point about this test.

In order for us to access your server, you will need to have that server on the Internet, then give us remote desktop login so that we can login to investigate further.

Thanks
Ian
Posted: Tuesday, November 26, 2013 3:15:20 PM
Rank: Newbie
Groups: Member

Joined: 11/26/2013
Posts: 1
I had the same issue, and the problem was the web server I was hosting used host headers.

To test if you are in the same situation, log into the web server and try to access the URL from there. If you get a connection error message, add the DNS information into the hosts file in windows/system32/drivers/etc like:

192.168.111.222 yoursite.yourdomain.com

The code is trying to access this URL directly on the server so if you can't access it in the browser on the server, the code is having the same problem.

There is probably a better way to solve this but it worked for me.
Diligence
Posted: Tuesday, November 22, 2016 8:50:20 AM
Rank: Newbie
Groups: Member

Joined: 11/22/2016
Posts: 1
Ian, you are a lifesaver. You were THE one to provide a solution here. Although the official support tried, YOU provided the real solution. Your explanation on why it happened was also much clearer and straight-to-the-point than the support's, and was also not vague. The way to find out where the problem was was more efficient with your suggestion and addresses the real problem better than EO's staff.

Thank you, Ian, for doing the job they couldn't do, and for free.


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.