Posted on: 3/16/2011 10:33:06 AM | Views : 701

I have created a customer RSA key container (for encrypting connection string in web.config) using the following command:
aspnet_regiis -pc "TestKeys" -size 2048 -exp
I then exported the key to an xml file and used it to initialise an instance of RSACryptoServiceProvider so that I could check the key size was definitely 2048. However, using the code below, the key size is displayed as 1024.
using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
{
    using Go to the complete details ...