Exception in RSACryptoServiceProvider

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"}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top