Some users may experience issues accessing the case portal. For more information, please click here.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Known Issue: Business Adapter Studio or MGSBI.exe fails to encrypt source connection details with error when running without administrator rights: "The type initializer for 'Flexera.BusinessImport.BusinessImporterCryptographer' threw an exception" (IOJ-1720238)

Known Issue: Business Adapter Studio or MGSBI.exe fails to encrypt source connection details with error when running without administrator rights: "The type initializer for 'Flexera.BusinessImport.BusinessImporterCryptographer' threw an exception" (IOJ-1720238)

Summary

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.

Cause

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.

Workaround

Run the Business Adapter Studio or MGSBI.exe with local administrator rights.

Additional details

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 encrypt source connection details with error when running without administrator rights: "The type initializer for 'Flexera.BusinessImport.BusinessImporterCryptographer' threw an exception" (IOJ-1720238)

Fix status

This issue is still open but not currently scheduled to be addressed.

Other information

Affected components: Business adapters

Master issue ID: IOJ-1720238

Also known as: FNMS-21170

Labels (1)
Was this article helpful? Yes No

Tip: If you have been impacted by this issue, please click the KUDOS button above. This helps to track the relative significance and importance of issues. Clicking on an option against "Was this article helpful?" also helps assess and improve the usefulness of content.

No ratings
Comments

The account I use to run the business adapter has local admin access and I still see this error.

@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.

Version history
Last update:
‎Jan 19, 2023 01:27 PM
Updated by: