This project has moved. For the latest updates, please go here.

Enumerating KeyContainer names on XP

Nov 2, 2011 at 5:34 PM


My group is using aspnet_regiis -pi to load key containers to encrypt parts of web.config.

I know I can use -pi to install key containers, -pe to export, or -pz to delete containers, but don't know how to enumerate all installed containers.

Another wrinkle - I am using XP so don't have NCRYPT.DLL so when I tried to use CngProvider.GetKeys, it complained about missing NCRYPT.DLL.

The key containers I want to see are in C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys.

Can I enumerate key containers with existing crypto utility?