I'm trying to make an asymmetric key available across all users of a machine.
First of all, is that the correct way to do it?
Second, if I run this from an admin account, and then run it from a limited account, I get an "Object already exists" error. This is presumably a permissions issue. What can I do to make it so any user across the machine can access this key container?
Code:
Dim cp As New CspParameters()
cp.KeyContainerName = "Red Pill"
cp.Flags = CspProviderFlags.UseMachineKeyStore
Dim rsa As New RSACryptoServiceProvider(cp)
rsa.PersistKeyInCsp = False
rsa.Clear()
cp = New CspParameters()
cp.KeyContainerName = "Red Pill"
cp.Flags = CspProviderFlags.UseMachineKeyStore
rsa = New RSACryptoServiceProvider(cp)
First of all, is that the correct way to do it?
Second, if I run this from an admin account, and then run it from a limited account, I get an "Object already exists" error. This is presumably a permissions issue. What can I do to make it so any user across the machine can access this key container?