简体   繁体   中英

Unable to load DLL 'ABCpdf11-32.dll'

having some issues getting ABCpdf11 working within IIS. I have made apps and tested locally without a problem, but having issues when moving to our servers.

I've copied the DLL's across into the bin folder, but it keeps complaining that it cant load ABCpdf11-32.dll. The file is present in the bin folder. We're just looking to update the version that we use from a much older one. Has anyone experienced this before?

 [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

Turns out its to do with it being on a UNC share, needs the following code before working with 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);
        }
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM