Author: guroo1000 | Posted on: 4/25/2007 2:43:00 PM | Views : 432

Hi,
I am trying to use RSACryptoServiceProvider in my ASP.NET application to access keys from a MachineKeyStore on my computer, running windows xp and IIS 5.
I created machinekeystore like following in Visual Studio 2005 Command Prompt:
aspnet_regiis -pc "CustomKeys" -exp (command was successful)
Then I executed following command because I am impersonating my web application with a non-default user:
aspnet_regiis -pa "CustomKeys" "domain\auserforapplication" (command was successful)
Then I worte the following code:
<code>public partial class Examples_EncryptionExample : System.Web.UI.Page
{
    CspParameters CspParam;
    string publicXmlString = string.Empty;
    string privateXmlString = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        try
& ...

Go to the complete details ...