Cannot create RSA key container

Discussion in 'ASP .Net Security' started by Bernard, May 21, 2008.

  1. Bernard

    Bernard Guest

    Hi group,

    I've been trying to create an RSA key container so I can encrypt my
    web.config connection strings section, but have been unable to.

    I was able to create and delete the container, but can no longer.
    It stopped working while I was creating and testing a deployment
    script to create the container and grant access to ASPNET user.

    But now every time I try to create or delete the container I get the
    following message:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -pc
    "SMSNotificationKey" -exp
    Creating RSA Key container...
    The RSA key container could not be opened.
    Failed!

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -pz
    "SMSNotificationKey"
    Deleting RSA Key container...
    The RSA key container was not found.
    Failed!

    Any ideas?

    Thanks in advanced.
     
    Bernard, May 21, 2008
    #1
    1. Advertisements

  2. Bernard

    Bernard Guest

    Solved my own problem... Looks like the asnet_regiis -pa corrupted the
    RSA directory's security options, removing all access to
    Administrators.
    I went to directory (C:\Documents and Settings\All Users\Application
    Data\Microsoft\Crypto\RSA) and re-established the access for ASPNET
    and Administrators.
     
    Bernard, May 28, 2008
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.