I have a command-line process that creates a PDF file from an HTML file using ABCpdf. I'm trying to upgrade from v5 (very old, no longer supported) to v8 but after installing ABCpdf 8 and updating my application to use the new DLL, I've noticed that the process which used to take less than a second to convert now takes 20+ seconds.
I've added some trace calls in the code and it appears that the point where the program attempts to reference an object from the ABCpdf 8 DLL is where things pause for a good long while. Once the code gets past that point it runs as fast as ever.
The question I have is: What could cause the CLR to slow down so much when attempting to reference a 3rd party library? I've verified that the ABCpdf 8 DLL is in the GAC as well as the same directory as the executable.
Thanks in advance.
Out on a limb, let me guess:
You are running this on a server without (outgoing) internet connectivity.
The component is strongnamed and signed with a cryptographic key. The certificate is being checked (the revocation list is checked whether the certificate is still valid and trusted). This times out due the absense of an internet connection.
If you want to confirm this, attach a debugger (WinDbg?) and confirm the following stacktrace on any of the threads:
0e82c1b4 7c822124 ntdll!KiFastSystemCallRet
0e82c1b8 77e6bad8 ntdll!NtWaitForSingleObject+0xc
0e82c228 73ca64ec kernel32!WaitForSingleObjectEx+0xac
0e82c254 73ca6742 cryptnet!CryptRetrieveObjectByUrlWithTimeout+0x12f
There has been a Service Pack release for Windows server editions that broke this by defaulting to have the check enabled. You can disable it using a registry setting.
See ASP.NET Hang: Authenticode signed assemblies:
Oh, that page didn't (clearly) link to the solution:
<generatePublisherEvidence>
ElementIf it is the cryptograpic issue, you can solve it by using the followng app.config entry. But afaik this is only an issue if the computer has dns, but no other internet connection available(firewall).
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With