【发布时间】:2012-07-19 15:37:15
【问题描述】:
我在经典 ASP 中使用 IIS 7.5 运行一个网站,该网站带有一个隔离的应用程序池 (ApplicationPoolIdentity)。在这个网站内,我还通过“WScript.Shell”对象运行方法运行非托管代码(wkhtmltopdf.exe)。之后,我将结果文件流式传输为 pdf
set wshell = CreateObject("WScript.Shell")
wshell.run wkhtmltopdf.exe http://www.mypagehanging.com c:\myfile.pdf", 0, TRUE
set wshell = nothing
一切正常,但有时我的网站会挂起。它完全卡住了。以应用程序池 (iis apppool\myapp) 身份运行的 wktmltopdf.exe 挂起。
这会导致我的所有网站都挂起,因为我运行程序时将选项 bWaitOnReturn 设置为 true。
我无法将此选项设置为 false,因为在流式传输 pdf 之前,我必须等待脚本完全执行。
找不到任何用于 wkhtmltopdf 的超时选项。无法理解为什么 wkhtmltopdf 挂起。但这可能是由我尝试渲染的网站而不是 wkhtmltopdf 引起的。
有什么建议吗?
【问题讨论】:
标签: iis asp-classic wkhtmltopdf