I'm having an issue with the RSACryptoServiceProvider. I'm using the following code:
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
StreamReader reader = new StreamReader(keyXmlFile);
string keyxml = reader.ReadToEnd();
rsa.FromXmlString(keyxml);
My code is throwing an exception on the following line:
rsa.FromXmlString(keyxml);
I'm getting a CryptographicException with the message:
The system cannot find the file specified.
I tried giving NETWORK SERVICE full control over the following directory:
C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys
However this does not help. I even created another app pool for my website and set the identity for that app pool to Local System, still does not help.&nb ...
Go to the complete details ...