cryptographic service provider problem

Discussion in 'ASP .Net Security' started by Eli Kremer, May 25, 2005.

  1. Eli Kremer

    Eli Kremer Guest

    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.
     
    Eli Kremer, May 25, 2005
    #1
    1. Advertising

  2. 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,

    --
    Duane Laflotte
    MCSE, MCSD, MCDBA, MCSA, MCT, MCP+I

    http://www.criticalsites.com/dlaflotte


    "Eli Kremer" <> wrote in message
    news:060d01c56155$72c38da0$...
    > 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.
    >
     
    Duane Laflotte, May 25, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrés Giraldo
    Replies:
    0
    Views:
    382
    Andrés Giraldo
    Jul 3, 2003
  2. Sven-Torben Janus
    Replies:
    3
    Views:
    2,678
    Sven-Torben Janus
    Sep 10, 2004
  3. Gabor
    Replies:
    0
    Views:
    522
    Gabor
    Dec 22, 2004
  4. Mike P
    Replies:
    0
    Views:
    2,302
    Mike P
    Mar 12, 2005
  5. Lars J.
    Replies:
    0
    Views:
    480
    Lars J.
    Jul 31, 2005
Loading...

Share This Page