CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired

Discussion in 'ASP.NET / ASP.NET Core' started by omegusprime, Dec 23, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello all,[​IMG]


    I am using the RSACryptoServiceProvider in my ASP.Net sight and I am getting the below error when I try to access the page that initializes the instance. Now I remember something about the Ciphering Strength affecting this class's ability to function. Meaning if the Cipher Strength of the computer is less than 128Bit, you may have problems, but I could not find anything to back this theory up. Can anyone help me with this issue? Thanks.


    CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Security.Cryptography.CryptographicException: CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired.

    Source Error:





    Code:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:





    Code:
    [CryptographicException: CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired.]
       System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize) +1045
       System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize) +78
       uswushuacademy.TokenMan..ctor() in T:\uswushuacademy\TokenMan.cs:28
       uswushuacademy.pages.admin.logon.__createTokMan() in t:\uswushuacademy\pages\admin\logon.aspx.cs:28
       uswushuacademy.pages.admin.logon.Page_Load(Object sender, EventArgs e) in t:\uswushuacademy\pages\admin\logon.aspx.cs:31
       System.Web.UI.Control.OnLoad(EventArgs e) +67
       System.Web.UI.Control.LoadRecursive() +35
       System.Web.UI.Page.ProcessRequestMain() +750
    

    Version Information:Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032 <!--
    [CryptographicException]: CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired.
    at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
    at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize)
    at uswushuacademy.TokenMan..ctor() in T:\uswushuacademy\TokenMan.cs:line 28
    at uswushuacademy.pages.admin.logon.__createTokMan() in t:\uswushuacademy\pages\admin\logon.aspx.cs:line 28
    at uswushuacademy.pages.admin.logon.Page_Load(Object sender, EventArgs e) in t:\uswushuacademy\pages\admin\logon.aspx.cs:line 31
    at System.Web.UI.Control.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain()
    [HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
    at System.Web.UI.Page.HandleError(Exception e)
    at System.Web.UI.Page.ProcessRequestMain()
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
    </BLOCKQUOTE>
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    the ASPNET system account does not have a profile, so it doesn't have
    access to the RSA key stuff.

    To resolve the problem, you will need to specify the keystore in the code (KeyContainerName)

    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=%23Keg1Q4TCHA.436%40tkmsftngp10&rnum=6&prev=/groups%3Fq%3DCryptoAPI%2Bcryptographic%2Bservice%2Bprovider%2B(CSP)%2Bfor%2Bthis%2Bimplementation%2Bcould%2Bnot%2Bbe%2Bacquired%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D%2523Keg1Q4TCHA.436%2540tkmsftngp10%26rnum%3D6

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page