Welcome Guest Search | Active Topics | Sign In | Register

HELP! EO.Pdf.HtmlToPdfException: Convertion failed. Failed to initialize conversion. Options
bcallister
Posted: Monday, April 23, 2012 7:12:15 PM
Rank: Newbie
Groups: Member

Joined: 3/29/2012
Posts: 7
i am getting the following error on several of our client PCs. i saw that someone had posted the same error before on this forum, and resolved it by running as Admin or using caspol.exe to trust the application. however, neither of those tricks are working for us. this is an urgent issue for us. any ideas?

also, fyi... our application resides in a folder on a server and all of the client PCs just have shortcuts on their Desktop to the .exe. the application folder is granted FullTrust via caspol.exe on each client machine. each client is running .NET Framework 4.0 and is on the same physical network.



The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Log Name: Application
Source: EO Debug Message
Event ID: 0
Level: Error
User: N/A

Logged: 4/23/2012 5:34:23 PM
Task Category: None
Keywords: Classic
Computer: XPOD-026.tnhv.tennheart.com



See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
EO.Pdf.HtmlToPdfException: Convertion failed. Failed to initialize conversion. ---> System.Exception: Failed to initialize conversion.
at EO.Pdf.Internal.kk.b(Byte[] A_0, Int32 A_1)
at EO.Pdf.Internal.kk.c(Byte[] A_0, Int32 A_1)
at EO.Pdf.Internal.kq.a(String A_0, Boolean A_1, String A_2)
at EO.Pdf.Internal.kq.a()
--- End of inner exception stack trace ---
at EO.Pdf.HtmlToPdfException.b(Exception A_0)
at EO.Pdf.Internal.kq.a()
at EO.Pdf.Internal.kq.b()
at EO.Pdf.Internal.kq.j()
at EO.Pdf.HtmlToPdf.a(kq A_0)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName)
at DK.RG.Client.PDFUtils.ConvertHtmlToPDF(String sHTMLFile, String sPDFFile, Single fPageSizeWidth, Single fPageSizeHeight, Single fMarginLeft, Single fMarginTop, Single fMarginRight, Single fMarginBottom, Boolean bAutoFitPage)
...


eo_support
Posted: Monday, April 23, 2012 7:24:31 PM
Rank: Administration
Groups: Administration

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

This is almost certainly a permission issue. You will want to move the files from the network to your local machine. .NET enforces different security rules when an exe is launched from the network. In theory you can configure your security policies (such as with caspol.exe) to get around it, but in practice it's much easier to just to move the files over.

Thanks!
bcallister
Posted: Tuesday, April 24, 2012 10:03:54 AM
Rank: Newbie
Groups: Member

Joined: 3/29/2012
Posts: 7
thanks for the help, but i cannot move the files. that is how we deploy our application within large enterprise scenarios and a really nice feature of .NET. if we moved our application to each client PC, we would have hundreds of clients that would need to be maintained every time there was a product update.

this deployment method is not new to us. we have been using it since .NET 1.1 release. the EO.Pdf.dll component is the first component that has had this issue after the source folder has been given FullTrust on the client PC. as mentioned, we are unable to get it to work after providing FullTrust to the source folder as well as when running as Administrator.

any further assistance you can offer would be greatly appreciated as this is important for us to be able to get up and running and is currently affecting many client PCs. please advise.

also, what version of the .NET framework is v.3.0.120.2 of EO.Pdf.dll built against?

thank you.
eo_support
Posted: Tuesday, April 24, 2012 10:24:24 AM
Rank: Administration
Groups: Administration

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

EO.Pdf.dll is built against .NET framework 2.0.

The reason our DLL is special is because it actually dynamically generates and runs a lot of unmanaged code inside and calls Windows API extensively. So it's not just .NET code access permission are involved here, it also involves Windows NT permissions. We can work with you to find out exactly where it fails, but we are neither .NET nor Windows security expert. So we will not be able to address the security issues that are causing our calls to fail. For example, we may be able to trace the problem to a call to a certain API trying to access a file but the API returnning an "access denied" error to us, in that case we can tell you what file we are trying to access, what API we call and what's the error code we receive, but we will not be able to tell you what you need to change to make this API call to succeed since that not only involves your own particular security settings/policies, but is also beyond our scope of expertise.

During the past we have run into issues with Assembly.Load simply failing without any error code due to security issues. In that case we are as much at lost as you are. That’s why we would not recommend you to use the DLL remotely. As an alternative, you can consider writing code to copy the DLLs from a shared network location to a local location and then run it off locally. It’s very little code but you would be able to avoid a lot of security headaches that way.

If you want to dig further into the error, check to see if you have any additional logs in your event viewer. You should see something like “Code = xxx, hr = xxxx” if you are using the latest version. If you see those, you can let us know the message and we will try to locate the point of failure for you.

Thanks!
bcallister
Posted: Tuesday, May 1, 2012 10:24:26 AM
Rank: Newbie
Groups: Member

Joined: 3/29/2012
Posts: 7
i appreciate your help. since your last post, i have gotten Microsoft involved to help us resolve this critical issue. they have taken some preliminary dumps of a sample machine that is experiencing this problem and have not come up with anything fruitful.

at this point, they are wanting to get you involved as they believe your involvement in this matter will be required in order to understand the problem better in hopes to find a fix or workaround. at this point, they dont see any reason to believe that this is a permissions issue.

can you be available today sometime for a conference call with myself and MS to discuss options? i will be syncing up with them in about 1 hour and told them that i would try to reach out to you. if so, what is the best way to reach you? thanks!
eo_support
Posted: Tuesday, May 1, 2012 10:41:47 AM
Rank: Administration
Groups: Administration

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

We will be happy to work with MS on this issue but we'd prefer to have a direct contact with their programmers/support engineers as we do not believe the root cause of this is something so obvious that we can find out through an one hour conference call. I would imagine that we will have to debug through the code until we can find out the exact point of failure, only after we reach that point, we can work with MS to either find an alternative code path, or an alternative deployment options to resolve or workaround this issue. Only that way we can resolve this issue for sure. Anything else would just be guess work.

As such we would hope you can setup a test environment, or produce detailed step by step instructions for how to setup a test environment so that both us and MS can duplicate the issue in house. From there on we can work with MS directly until we get to the bottom of the issue ---- obviously we will do most of the debug work until we reach any of MS's function that fails and we cannot find why. At that point we can produce a test app send to MS and MS can then continue working on it.

There are also detailed implementation details that we are not at position to disclose to another party without a confidential agreement. So we may require you or MS to sign such agreement if it becomes necessary for us to disclose such information. We will be very happy to sign your non disclosure agreement too if it becomes necessary for you to disclose confidential information to us.

Thanks!
bcallister
Posted: Tuesday, May 1, 2012 10:49:00 AM
Rank: Newbie
Groups: Member

Joined: 3/29/2012
Posts: 7
no problem. we understand. MS just wanted to have a brief conference call between all of us so that we can discuss how best to approach the problem and next steps. we have a PC here that we can use for testing. please advise your availability. you can reach me via email at: [removed by admin] thanks.
eo_support
Posted: Tuesday, May 1, 2012 12:58:35 PM
Rank: Administration
Groups: Administration

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

We will contact you via email if we have any update. Since the forum is public, we have removed your email address from your post to avoid it being harvested by spammers.

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.