How to call htmltools.exe from IIS7.5? How to show detailed log message in IIS 7.5? How to set execute permission in IIS 7.5?

The following is the sample ASP code to call htmltools.exe to convert a web page to PDF file,


Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("C:\inetpub\wwwroot\BL\htmltools\htmltools.exe -webkit C:\inetpub\wwwroot\bl\pdftest\VeryPDF.pdf")
Set objStdOut = objWshScriptExec.StdOut
strOutput = objStdOut.ReadAll

strOutput = Replace(strOutput, vbCrLf, "<br>")
strOutput = Replace(strOutput, vbCrLf & vbCrLf, "<p>")


灯泡  If your IIS 7.5 hasn't permission to run an EXE application, please change the permission by following steps,

Setting Script, Execute Folder Permissions in IIS 7.5
Was working on an issue with Silverlight the other day and wanted to verify the folder settings in IIS 7.5 and it occurred to me I'd forgotten. I checked around and it took a few minutes to find - but too long so here's the short of it:

  1. Open Internet Information Services Manager (IIS)
  2. Expand the web site in the left hand panel
  3. Locate the folder and click on it to select it
  4. Double click 'Handler Mappings' in the middle panel
  5. On the right hand panel, click 'Edit Feature Permissions...'
  6. Set permissions as desired

Was simple, but they've made it a four step process in 7/7.5...




灯泡  If your IIS 7.5 can't show the detailed error message, please refer to following steps to open the detailed error message,

IIS 7.5 , 2008rc2, classic asp, 500 error message:

    The page cannot be displayed because an internal server error has occurred.

I need to know how to configure IIS to get a more detailed error.
I've tried setting to true all of debugging options in the ASP configuration.
But that didn't work. Can anyone help me?

The first, please check "Show friendly HTTP error messages" in IE,


So if "Send Errors To Browser" is not working set also this:

Error Pages -> 500 -> Edit Feature Settings -> "Detailed Errors"

Also note that if the content of the error page sent back is quite short and you're using IE, IE will happily ignore the useful content sent back by the server and show you its own generic error page instead. You can turn this off in IE's options, or use a different browser.



OK, after above settings, when you run this ASP page from web browser, you will see following log message, it is indicate this HTML file has been converted to PDF file on your server, everything is work fine now.


VN:F [1.9.20_1166]
Rating: 6.7/10 (3 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
How to call htmltools.exe from IIS7.5? How to show detailed log message in IIS 7.5? How to set execute permission in IIS 7.5?, 6.7 out of 10 based on 3 ratings

Related Posts

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!