3rd Party assembly slow to load

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> Element
  • FIX: A .NET Framework 2.0 managed application that has an Authenticode signature takes longer than usual to start

If 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>