I'm getting the following error when attempting to decrypt a string using the DecryptStringAsymetricalComponent in Workflow 7.0 SP3:
Component Name: DecryptStringAsymetricalComponent
Exception Message: The system cannot find the file specified.
Error Stack Trace:
System.Security.Cryptography.CryptographicException: The system cannot find the file specified. at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters) at System.Security.Cryptography.RSA.FromXmlString(String xmlString) at LogicBase.Framework.EncryptionHelper.DecryptByteArray(Byte[] publickey, Byte[] privateKey, Byte[] value, AsymetricalCryptographyTypes type) in c:\build\projects\WF7RC1B\core\LogicBase.Framework\utilities\EncryptionHelper.cs:line 241 at LogicBase.Framework.EncryptionHelper.DecryptString(Byte[] publickey, Byte[] privateKey, Byte[] value, AsymetricalCryptographyTypes type) in c:\build\projects\WF7RC1B\core\LogicBase.Framework\utilities\EncryptionHelper.cs:line 150 at LogicBase.Components.Encryption.DecryptStringAsymetricalComponent.Run(IData data) in c:\build\projects\WF7RC1B\components\LogicBase.Components.Encryption\EncryptionSource.cs:line 1006 at LogicBase.Core.ExecutionEngine.MultiPathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context) in c:\build\projects\WF7RC1B\core\LogicBase.Core\ExecutionEngine\ExecutionEngineDelegates.cs:line 280 at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.DoRunComp(IOrchestrationComponent comp, IData data, TLExecutionContext context) in c:\build\projects\WF7RC1B\core\LogicBase.Core\ExecutionEngine\ExecutionEngineImplementation.cs:line 465
I have two separate projects. One uses the EncryptStringAsymetricalComponent to encrypt four strings of Type RSA. The other project uses the DecryptStringAsymetricalComponent to decrypt those strings and return the values for password reset challenge questions/answers. The decrypt component works fine using the debugger on my local machine with the Internal Web Server Workflow uses but once I debug in IIS or publish to IIS, it returns the errors. I've tried it in IIS with both Identity Impersonation and using an AppPool that uses the Identity of my service account, but both fail. Windows Integrated Authentication is turned on and Anonymous is not an option.
If anyone has successfully worked with these components before, could you please share what is needed for the Decrypt component to work?
Thanks!