Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

The type initializer for 'NationalInstruments.NI4882.Internal.GpibDll' threw an exception ...

I just installed the 3.0.2 version of the 488-2.  I went to run the sample C# project and received the following error: The type initializer for 'NationalInstruments.NI4882.Internal.GpibDll' threw an exception.  Further inspection of the exception revealed: This implementation is not part of the windows FIPS validated cryptographic algorithms. I checked both my visual studio and windows 7 settings and it is disabled. Anyone have any ideas. This error occurs when I instantiate a device.  Thanks in advance

0 Kudos
Message 1 of 10
(3,981 Views)

Have you tried reinstalling the drivers? It sounds like it's not finding the dll correctly.

 

Also, what specific example are you using and are there other examples that you have tried?

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 2 of 10
(3,969 Views)

I'll give that a shot come Monday and report back.

 

Thanks

0 Kudos
Message 3 of 10
(3,964 Views)

I tried the following samples none of which worked:  Notify, SimpleAsynchronousReadWrite, SimpleReadWrite.  I tried doing a repair of the installation as well trying the samples and still I received the crypto error.  I have checked the registry settings and the FIPS is disabled.

0 Kudos
Message 4 of 10
(3,953 Views)

Here is the complete error:

 

The type initializer for 'NationalInstruments.NI4882.Internal.GpibDll' threw an exception.

 

System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

  at System.Security.Cryptography.MD5CryptoServiceProvidor..ctor()

  at NationalInstruments.NI4882.Internal.GpibDll..ctor()

  at NationalInstruments.NI4882.Internal.GpibDll.ibdev(Int32 boardID, Int32 pad, Int32 sad, Int32 tmo, Int32 eot, Int32 eos) 

  at NationalInstruments.NI4882.Internal.DeviceImpl..ctor(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Boolean setEndOnWrite, Boolean endOfStringCharacterUsedOnRead, Object sender) 

  at NationalInstruments.NI4882.Internal.DeviceImpl..ctor(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Object sender)

  at NationalInstruments.NI4882.Internal.DeviceImpl..ctor(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Object sender)

  at NationalInstruments.NI4882.Internal.Device..ctor(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress)

0 Kudos
Message 5 of 10
(3,946 Views)

Reinstalling did not work here is the complete error:

 

The type initializer for 'NationalInstruments.NI4882.Internal.GpibDll' threw an exception.

 

System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

  at System.Security.Cryptography.MD5CryptoServiceProvi​dor..ctor()

  at NationalInstruments.NI4882.Internal.GpibDll..ctor(​)

  at NationalInstruments.NI4882.Internal.GpibDll.ibdev(​Int32 boardID, Int32 pad, Int32 sad, Int32 tmo, Int32 eot, Int32 eos) 

  at NationalInstruments.NI4882.Internal.DeviceImpl..ct​or(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Boolean setEndOnWrite, Boolean endOfStringCharacterUsedOnRead, Object sender) 

  at NationalInstruments.NI4882.Internal.DeviceImpl..ct​or(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Object sender)

  at NationalInstruments.NI4882.Internal.DeviceImpl..ct​or(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Object sender)

  at NationalInstruments.NI4882.Internal.Device..ctor(I​nt32 boardNumber, Byte primaryAddress, Byte secondaryAddress)

0 Kudos
Message 6 of 10
(3,945 Views)

I have examples for multiple versions of the .NET runtime, which are you trying to run?

 

Also, what hardware are you trying to interface with?

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 7 of 10
(3,938 Views)

Hello, I'm also getting this error. I'm using NI488.2 version 3.0 on a computer that requires FIPS compliant crypto algorithms.

Any ideas? Thanks, Tom

0 Kudos
Message 8 of 10
(3,787 Views)

Hi Tom,

 

Quick check: are you using Visual Studio 2010? It looks like this is a known issue addressed in the following KB:

 

Why Does Visual Studio 2010 Fail to Build When FIPS Compliance Is Enabled in Windows?

http://digital.ni.com/public.nsf/allkb/990781D72A73D65586257968006B402B?OpenDocument

 

Let us know if this applies to you or not.

 

Cheers,

 

Andy C.

Applications Engineering

National Instruments 

 

0 Kudos
Message 9 of 10
(3,765 Views)

Hi Andy, thanks for the reply.

 

No, this is not the issue I'm having. The project I'm working on is VS 2008 and it compiles fine. I'm able to cause the exception by setting the FIPSALGORITHMPOLICY key in the registry on my dev computer (clearing it is not an option on our production computers).

 

 I'd like to still use the NI488.2 drivers, but since I haven't seen the issue with NI's VISA drivers, I'm in the process of converting my code to use it.

 

-Tom

0 Kudos
Message 10 of 10
(3,756 Views)