Exception in RSACryptoServiceProvider

  • Thread starter Thread starter ajayleo
  • Start date Start date
A

ajayleo

Hello

The following line of code throws an exception" The System Cannot find
the file specified".
This is on .Net 2.0.

RSA rsaKey = new RSACryptoServiceProvider(); //Creating with Default
key


Appreciate the help
Thanks


rsaKey shows up as follows during debugging.


-rsaKey
{System.Security.Cryptography.RSACryptoServiceProvider}
-base
{System.Security.Cryptography.RSACryptoServiceProvider}

KeyExchangeAlgorithm "RSA-PKCS1-KeyEx"

- KeySize ((System.Security.Cryptography.AsymmetricAlgorithm)
(rsaKey)).KeySize'
threw an exception of type

'System.Security.Cryptography.CryptographicException'

+base {"The system cannot find the file specified.\r\n"}
 
Back
Top