从今天起,qpdf停止在我的服务器上工作。
我重启了IIS,重启了整台机器,回收了应用程序池,尝试了32位和64位版本(我得到了程序试图加载32位dll的错误格式错误),尝试了旧版本的qpdf,现在我非常困惑,因为我甚至没有从错误消息中获得线索。
该项目目前在vb.net中,用于重现该项目的代码如下:
'Importing the function here
<DllImport("qpdf21.dll", CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl)>
Private Shared Function qpdf_init() As IntPtr
End Function
'try to use it here, works fine on dev, worked on server last week but now throws "External component has thrown an exception"
Public Shared Function LinearisePdf(fileName As String) As String
Dim qpdf As IntPtr = qpdf_init()
end function来自抛出错误的服务器的堆栈跟踪如下所示:
External component has thrown an exception. at DocumentManager.PdfOcr.qpdf_init() at DocumentManager.PdfOcr.LinearisePdf(String fileName) in ...关于如何通过获取更多关于错误是什么的详细信息来继续解决这个问题,或者可能还有更多可以尝试的事情,有什么想法吗?
服务器为:
Windows server 2016版本1607 (操作系统内部版本14393.2828)
互联网信息服务(版本10.0.14393.0)
我已经从here下载了qpdf v8.4.0 msvc64
发布于 2019-04-24 16:21:42
运行应用程序池的用户的计算机权限似乎已经更改,一旦我们将其重新设置为计算机管理员,它就会停止抛出此异常。
https://stackoverflow.com/questions/55795882
复制相似问题