[英]Unable to load DLL ‘ABCpdf9-32.dll’. The specified module could not be found (Exception from HRESULT: 0x8007007E)
[英]Unable to load DLL 'ABCpdf11-32.dll'
让 ABCpdf11 在 IIS 中工作时遇到一些问题。 我已经制作了应用程序并在本地进行了测试,没有问题,但是在移动到我们的服务器时遇到了问题。
我已将 DLL 复制到 bin 文件夹中,但它一直抱怨无法加载 ABCpdf11-32.dll。 该文件存在于 bin 文件夹中。 我们只是想从更旧的版本更新我们使用的版本。 有谁之前经历过这个吗?
[DllNotFoundException: Unable to load DLL 'ABCpdf11-32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
.() +0
.() +7
WebSupergoo.ABCpdf11.XSettings.get_Version() +25
..ctor() +93
.() +101
.(String , Boolean ) +14
WebSupergoo.ABCpdf11.XSettings.InstallLicense(String license) +10
原来它与它在 UNC 共享上有关,在使用 ABCpdf 之前需要以下代码。
if (HttpRuntime.IsOnUNCShare)
{
var path = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Process);
if (path != null)
{
if (path.IndexOf(HttpRuntime.BinDirectory, StringComparison.OrdinalIgnoreCase) < 0)
{
path = path.Trim().TrimEnd(';') + ";" + HttpRuntime.BinDirectory;
Environment.SetEnvironmentVariable("Path", path, EnvironmentVariableTarget.Process);
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.