Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crypto key store

Status
Not open for further replies.

kettch

Programmer
Mar 5, 2001
110
US
I'm trying to make an asymmetric key available across all users of a machine.

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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top