The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.
When trying to use the Business Adapter Studio Encrypt Connection Information option in a business adapter and save the file, the following error is displayed:
The type initializer for 'Flexera.BusinessImport.BusinessImporterCryptographer' threw an exception
A similar error is displayed when invoking the MGSBI.exe command line tool using the /Encrypt or /EncryptValue option.
The Business Adapter Studio and MGSBI.exe tool attempts to create an encryption key in the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft when the encrypting connection information.
This error will be displayed if the Studio or MGSBI.exe is run by an unprivileged user who does not have rights to write to this registry area.
Run the Business Adapter Studio or MGSBI.exe with local administrator rights.
A stack trace similar to the following may be shown when inspecting debugging information associated with the error when this issue occurs:
System.TypeInitializationException: The type initializer for 'Flexera.BusinessImport.BusinessImporterCryptographer' threw an exception. ---> System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\ManageSoft Corp\ManageSoft' is denied. at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions) at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck) at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey) at Flexera.BusinessImport.BusinessImporterCryptographer.DeserializeEncryptionKey() at Flexera.BusinessImport.BusinessImporterCryptographer..cctor() --- End of inner exception stack trace --- at Flexera.BusinessImport.BusinessImporterCryptographer..ctor() at Flexera.BusinessImport.CryptographerSelector.GetCryptoScheme(Int32 schemeID) at Flexera.BusinessImport.CryptographerSelector.GetCryptoScheme(String scheme) at Flexera.BusinessImport.ManageSoftImport.get_ConnectionString() [...]
Also see the following article which describes a similar (but slightly different) error message and scenario: Known Issue: Business Adapter Studio or MGSBI.exe fails to open adapter files if encryption details in MGSBI registry entry cannot be processed: "The type initializer for 'Flexera.BusinessImport.CryptographerSelector' threw an exception" (IOK-1009299)
There are no plans to address this issue.
Affected components: Business adapters
Master issue ID: IOJ-1720238
Also known as: FNMS-21170
Aug 25, 2021 02:28 AM - edited Jun 19, 2024 02:26 AM
@jdalton2 - are you actually running the Business Adapter Studio process with local admin rights (e.g. right click on the shortcut and select "Run as administrator")? Depending on your setup, just clicking on the shortcut without clicking "Run as administrator" may not run with local admin rights, even if you are logged in as a user who potentially has those rights.