Problem running htmltools from ASP.NET / IIS 7.5 / Server 2008 R2

I'm having trouble running htmltools.exe from ASP.NET C# code on a Windows Server 2008 R2. I have tried everything I could find, but still have no luck.

The exit code of the process is -1073741502, and each attempt run generates an event log entry with this message:
Application popup: htmltools.exe - Application Error : The application was unable to start correctly (0xc0000142). Click OK to close the application.

These are all the things I've tried, with no luck:

- ran the command manually from an administrator elevated command prompt (works)
- ran the command manually from a normal command prompt (works after the above is run first)
- registered the htmlshell.dll manually both using the 32bit and 64bit regsvr32
- copied the two dlls mentioned in install.bat in both system32 and syswow64 folders
- tried with the latest htmltools.zip downloaded from from verypdf.com (which even though I supply it with a valid license key it still says it's a trial)
- added write privileges to all folders of the web application and the htmltools folder for the IIS application pool
- tried setting the Domain, Username and Password fields of the ProcessStartInfo object to my own Domain Admin credentials, and added full write privileges to my own user to all folders involved
- tried using both a 32bit and a 64bit IIS application pool

At this point, I have nothing else left to try. As far as I can see, the application fails to start because it's DLLs are not being loaded properly. (the 0xc0000142 error is STATUS_DLL_INIT_FAILED)

Is there something else I can try? Does the application work at all when launched from .NET under IIS 7.5?

Thanks.
Customer
----------------------------------------------------

image
Thanks for your message, you can use "VeryPDFComRunCmd COM Component" to call htmltools.exe from your ASP.NET C# code to convert HTML file to PDF file, "VeryPDFComRunCmd COM Component" can be downloaded from following web page,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

You can set "VeryPDFCom.RunCmd" COM run inside administrator user account, then you can use following code to convert HTML file to PDF file from administrator user account,

set VeryPDFCom = CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
strRet = VeryPDFCom.RunCmd2("D:\\verypdf\\htmltools.exe D:\\test.html D:\\out.pdf", 5)
strRet = VeryPDFCom.RunCmd2("D:\\verypdf\\htmltools.exe -webkit D:\\test.html D:\\out.pdf", 5)
msgbox strRet

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in HTML Converter (htmltools), VeryPDF SDK & COM and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!