MFA Agent 2.1.x Online Authentication Test Fails with Error: "The type initializer for 'Newtonsoft.Json.JsonWriter' threw an exception."
2 years ago
Article Number
000067935
Applies To
RSA Product Set: SecurID Access
RSA Product/Service Type: MFA Agent for Microsoft Windows
Issue
After installing and configuring the MFA Agent for Microsoft Windows on Windows 10 (version 21H1), online authentication test fails with the below error in the RsaMfaAgentTestAuthentication log file:
"Exception: System.TypeInitializationException: The type initializer for 'Newtonsoft.Json.JsonWriter' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Newtonsoft.Json.Utilities.ConvertUtils' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest." 

The Windows Event Viewer logs for the MFA Agent application shows error:
"The type initializer for 'Newtonsoft.Json.JsonWriter threw an exception."
Cause
Microsoft Visual C++ 2008 packages for x64 and x86 are not installed on the Windows machine. 
Resolution
1. Download and install Microsoft Visual C++ 2008 Packages (32-bit and 64-bit) - https://www.microsoft.com/en-in/download/details.aspx?id=26368

2. Restart the Windows machine. 

3. Test online authentication.