cryptographic service provider problem

E

Eli Kremer

I get an error "CryptoAPI cryptographic service provider
(CSP) for this implementation could not be acquired"

I used MachineKey store and DefaultKeyStore in order to
define a key container:

const int PROVIDER_RSA_FULL = 1;
const string CONTAINER_NAME = "SpiderContainer";
CspParameters cspParams;
cspParams = new CspParameters(PROVIDER_RSA_FULL);
cspParams.KeyContainerName = CONTAINER_NAME;
cspParams.Flags =
CspProviderFlags.UseDefaultKeyContainer;//UseMachineKeySto
re
cspParams.ProviderName = "Microsoft Strong
Cryptographic Provider";
rsa = new RSACryptoServiceProvider(cspParams);

This code fails in last row. Before some time this code
worked perfectly! I didn't perform any changes, but it
stopped working!I think there could be problems with
security srights to Machinekeystore. Thank to everybody
who can help me.
 
D

Duane Laflotte

Eli,
That is weird that it used to work and now is busted. I agree with the
thought that it may be a problem with the MachineKeyStore permissions. If
that is the case I would make sure that the ASPNET user has access to the
<root drive:>\Documents and Settings\All Users\Application
Data\microsoft\crypto\rsa\MachineKeys directory. This is a bit of a long
shot though, as it did worked before, but I would still check it out.
Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top