While implementing AWS client side encryption created object of AmazonS3EncryptionClientV2 which implements AmazonS3EncryptionClientBase. In local everything working fine but when uploaded on server it is giving following exception
Message: Type 'Amazon.Extensions.S3.Encryption.AmazonS3EncryptionClientBase' from assembly 'Amazon.Extensions.S3.Encryption, Version=1.2.1.0, Culture=neutral, PublicKeyToken=885c28607f98e604' is attempting to implement an inaccessible interface.
Other dll's version as follows,
Amazon.Extensions.S3.Encryption - 1.2.1
AWSSDK.Core -3.5.2
AWSSDK.KeyManagementService -3.5.2.2
AWSSDK.S3 - 3.5.7.8
Also tried with upgrading dll's, still getting same issue
Message: Type 'Amazon.Extensions.S3.Encryption.AmazonS3EncryptionClientBase' from assembly 'Amazon.Extensions.S3.Encryption, Version=2.1.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604' is attempting to implement an inaccessible interface.
Dll versions for above one
Amazon.Extensions.S3.Encryption - 2.1.0
AWSSDK.Core - 3.7.300.3
AWSSDK.KeyManagementService - 3.7.300.3
AWSSDK.S3 - 3.7.300.3
to create client
using (var client = new AmazonS3EncryptionClientV2(PublicKey, SecretKey, config, EncryptionMaterials))
{
client.PutObject(putobject);
}