Forum Discussion

jhellerag's avatar
jhellerag
Helper
12 years ago

Initializing LithiumSSOClient throws "type initializer" exception

Hello,

 

I'm attempting to move the login, register, and forgot password pages between two IIS sites. I moved the code itself (which I didn't change at all), the SSO key, the 11 Lithium values in the web.config, and the LithiumSSOClient.dll file. 

 

However when attempting to excute anything that interacts with SSO, I get the following error:

 

[SSOException: Lithium Encryption Key not initialized.System.Exception- error reading stream: The type initializer for 'LithiumSSOClient.KeyManager' threw an exception., stack trace: at LithiumSSOClient.KeyManager.readKey(String file)
at LithiumSSOClient.SSOClient.initKey()]
LithiumSSOClient.SSOClient.initKey() +544

 

The line of code looks like so:

 

LithiumSSOClient.SSOClient.init(pathtoLithiumSSOKey, pathtoLithiumSSOUniqueID, pathtoLithiumSSODomain);

 

I also confirmed that the permissions set on the key file are standard. I know that it's at least seeing the key as deleting it gives me another error. Any ideas? We've been stuck on this issue for a few weeks now. Thank you!

  • YuriK's avatar
    YuriK
    12 years ago
    Hey Jon,

    Did you copy over the BouncyCastle.Crypto.dll?

    Thank you,

    Yuri
  • YuriK's avatar
    YuriK
    Khoros Expert

    Hey jhellerag,

     

    You will need to make sure that your client specific encryption key is installed in the location specified by "pathtoLithiumSSOKey" below. 

     

    Hope this helps,

     

    Yuri

    • jhellerag's avatar
      jhellerag
      Helper

      Hi Yuri,

       

      Thanks for the response. I did copy the encryption key to the new site. I confirmed this by temporarily removing the key and trying to log in, at which point I got a different error about the key missing. When I put the key back, I got the error mentioned above instead.

       

      Thanks,

      Jon

      • YuriK's avatar
        YuriK
        Khoros Expert
        Hey Jon,

        Did you copy over the BouncyCastle.Crypto.dll?

        Thank you,

        Yuri