簡體   English   中英

無法加載 DLL 'ABCpdf11-32.dll'

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM