JNBridgePro tools or JNBridgePro-enabled application takes a long time to start

You are using the 2.0-targeted JNBridgePro proxy generator or registration tool, or are using a JNBridgePro-enabled (2.0-targeted) application, and it takes a long time to start. In fact, it may seem like it hangs, although if you wait long enough, it will start.

 

The problem is a bug in the .NET 2.0 cryptographic library, which is used in the JNBridgePro licensing mechanism. The problem is described in this Microsoft knowledge base article: http://support.microsoft.com/kb/948080.  Essentially, if you are running on a Windows domain, some cryptographic operations will attempt to contact the domain controller. If the domain controller is slow or incorrectly configured, there will be a delay. This delay is unnecessary, since there is no good reason why the domain controller should be contacted.

 

The following solution to this problem was described at http://www.pcreview.co.uk/forums/thread-3428177.php and involves editing the machine.config file. Look for machine.config in your machine’s WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIG folder.  Open it in a text editor.  If there is no <mscorlib> section in the file, add the following lines to the file (probably best just before the </configuration> tab:

 

<mscorlib>

   <cryptographySettings>

      <oidMap>

         <oidEntry OID="1.2.840.113549.2.5" name="1.2.840.113549.2.5"/> <!– MD5 –>

         <oidEntry OID="1.3.36.3.2.1" name="1.3.36.3.2.1"/> <!– RIPEMD160 –>

         <oidEntry OID="1.3.14.3.2.26" name="1.3.14.3.2.26"/> <!– SHA1 –>

         <oidEntry OID="2.16.840.1.101.3.4.2.1" name="2.16.840.1.101.3.4.2.1"/> <!– SHA256 –>

         <oidEntry OID="2.16.840.1.101.3.4.2.2" name="2.16.840.1.101.3.4.2.2"/> <!– SHA384 –>

         <oidEntry OID="2.16.840.1.101.3.4.2.3" name="2.16.840.1.101.3.4.2.3"/> <!– SHA512 –>

      </oidMap>

   </cryptographySettings>

</mscorlib>

 

If there already is an <mscorlib> section, just add the contents of the <mscorlib> section above into the <mscorlib> section of machine.config, and similarly for any sections within machine.config’s <mscorlib> section that may already exist.  This will prevent the crypto library from going to the network for the lookup.