How to check if a Key Container Exists

Is there a way to check if a Key Container exists?  I have created one and encrypted sections of the web.config.  All this works as expected.   I am wondering if there is a way to check through code if a Custom Key Container exists?

Thanks for any help or ideas -
obautistaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
I don't have any idea, but this is a really good question. Key containers are stored in different places, depending on what kind (machine or user), and what operating system.

Key Containers: Basics
http://blogs.msdn.com/alejacma/archive/2007/12/13/key-containers-basics.aspx

"Key containers can be found here by default:

+ User containers:

- Vista:

C:\Users\\AppData\Roaming\Microsoft\Crypto\RSA

- Previous Windows:

C:\Documents and Settings\\Application Data\Microsoft\Crypto\RSA

+ Machine containers:

- Vista:

C:\Users\All Users\Application Data\Microsoft\Crypto\RSA

- Previous Windows:

C:\Documents and Settings\all users\Application Data\Microsoft\Crypto\RSA"


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bob LearnedCommented:
I know that you can configure the key container with ASPREG_IIS, but I don't see a way to enumerate key containers:

ASP.NET IIS Registration Tool (Aspnet_regiis.exe)  
http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.