000011657 - RKM: 'Exception: An attempt was made to load a program with an incorrect format.' on Windows 64-bit

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000011657
Applies ToRKM C# Client 2.7 SP1
Windows
64-bit
IssueRKM: "Exception: An attempt was made to load a program with an incorrect format." on Windows 64-bit
4:00 PM - Exception: The type initializer for 'kmPINVOKE' threw an exception.
4:00 PM - StackTrace:    at kmPINVOKE.R_KM_CTX_new_from_file__SWIG_1(String jarg1, Int32& jarg2)
   at Rsa.KeyManagerClient.RkmContext..ctor(String configurationFileName, String credentialPassword, String cachePassword)
   at RSAHelper.get_RSAContextObject()
4:00 PM - Exception: The type initializer for 'SWIGExceptionHelper' threw an exception.
4:00 PM - StackTrace:    at kmPINVOKE.SWIGExceptionHelper..ctor()
   at kmPINVOKE..cctor()
4:00 PM - Exception: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
4:00 PM - StackTrace:    at kmPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_km(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
   at kmPINVOKE.SWIGExceptionHelper..cctor()
Installed RKM C# Client on a 64-bit server, set Web application to run as a 32-bit application (from IIS7, right click on the application's application pool, go to "Advanced Settings" and change "Enable 32-Bit Applications" to "TRUE").
CauseIIS is expecting the application to be entirely 32 bit, including the libraries that get loaded, and may be interfering with any 64-bit execution.
ResolutionTurn off the 32-bit option (from IIS7, right click on the application's application pool, go to "Advanced Settings" and change "Enable 32-Bit Applications" to "FALSE")  in order to get the Web application along with RKM Client to execute properly as a 64-bit Web application.
Legacy Article IDa56922

Attachments

    Outcomes