Hi,
I am doing encryption using a public key(Working fine in the plugin) and decryption using private which is working in a Console app but not working in the plugin. getting below error.
Error : System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.KeyContainerPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Security.Cryptography.Utils.ImportCspBlobHelper(CspAlgorithmType keyType, Byte[] keyBlob, Boolean publicOnly, CspParameters& parameters, Boolean randomKeyContainer, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.ImportCspBlob(Byte[] keyBlob)
at BeatPlan.Plugins.PluginBase.Decrypt(Byte[] encryptedBytes, ITracingService log)
at BeatPlan.Plugins.PluginBase.LicenseValidation(IOrganizationService service, ITracingService log)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.KeyContainerPermission
The Zone of the assembly that failed was:
MyComputer
*This post is locked for comments
I have the same question (0)