I have error creating asymmetric token when I have another extension dependency which also use BouncyCaslte.Crypto.dll. The error stack is:
[1] Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at ssJWT.RssExtensionJWT_Core.MssCreateToken(HeContext heContext, IRecord inParamSymmetricCredentials, IRecord inParamAsymmetricCredentials, IRecord inParamPayload, String& outParamResultMessage, String& outParamPlainToken, String& outParamSignedAndEncodedToken) at ssJWT.Actions.ActionCreateSignedAsymmetricTokenWithPemKey(HeContext heContext, Int32 inParamAlgorithm, String inParamKeyId, String inParamPrivateKey, String inParamPrivateKeyPassword, String inParamTokenId, String inParamIssuer, String inParamSubject, String inParamAudience, DateTime inParamExpiration, DateTime inParamNotBefore, DateTime inParamIssuedAt, RLClaimRecordList inParamClaims, Boolean& outParamSuccess, String& outParamResultMessage, String& outParamPlainToken, String& outParamSignedAndEncodedToken)[2] The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
But the other extension dependency can function without any error.
Did you check if the extensions use different versions of BouncyCastle? If they are different, It might be the cause of the problem. If so and you still want to use these extensions, you can check if they have versions that use the same version of BouncyCastle, or if you can do that change in the extension itself.
Guilherme Barbosa wrote:
How do I check?
But the other extension dependency can function without any error. If different version why would it not affect the other extension?
Meng Wye, Lavin Lim wrote:
For JWT, I get:
As you can see, versions are indeed different. Try to use the same as in the other extension and to update the extension if it is not too complicated.
JWT in Forge currently is using 1.8.3, but in the upcoming version to be released it will be upgraded to 1.8.5.