I've been trying to write a tool to use RsaProtectedConfigurationProvider to secure the connectionStrings settings of my application. While there are many tutorials on managing this using aspnet_regiis.exe command lines, I haven't found much in terms of doing these through the ConfigurationManager API.
That said, I have a few questions on managing this programmatically:
- Can you specify using a machine or user level keys?
- Can you identify and export the key you are using?
- Encryption seems to require manually giving the user access to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys (source). Why?
Thank you in advance.