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

From: Allen Owen (alleno@intenda.co.za)
Date: 07/24/02


From: "Allen Owen" <alleno@intenda.co.za>
Date: Wed, 24 Jul 2002 10:52:02 +0200


Hi,

I've just encountered this error using the RSACryptoServiceProvider and
would imagine that you're having the same problem using des.

The reason that you're getting the problem is because the ASPNET user (in
.NET), or your IUSR_machinename user in conventional asp is not an
interactive user and as such doesn't have its own UserKeyStore which your
des class references when it is instantiated.
What you can do to correct this is pass a directive to the class to use the
MachineKeyStore :

CspParameters cspParam = new CspParameters();

cspParam.Flags = CspProviderFlags.UseMachineKeyStore;

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(cspParam);

This is one possible solution. Another is to turn impersonation on and thus
user the impersonated user's keystore.

Hope this helps.

Cheers

Allen

alleno@intenda.co.za

"Chen Wei" <chenwei@testel.com.sg> wrote in message
news:OtnRVkDFCHA.2064@tkmsftngp07...
> Dear all,
>
> I code one COM dll which will call an assembly, and this COM dll will be
> used by ASP pages. Both COM component & assembly work very well in stand
> alone window application, but I have the following problem when I try to
> can the COM component in ASP page, what goes wrong? I'm using
> DESCryptoServiceProvider, my OS is NT4.0 sp6.
>
> mscorlib error '80131430'
>
> CryptoAPI cryptographic service provider (CSP) for this implementation
could
> not be acquired.
>
> Thanks in advance and reply to chenwei@testel.com.sg
>
>
>



Relevant Pages

  • Re: rafraichissement aiutomatique dune page asp
    ... en Faites c'est juste un affichage, car les enreg je les gére par des ... client par des rs pour l'affichage) avec un peu de xml et feuille de style ... >> j'ai une page asp composée de tableaux. ... >> J'aimerais rafraichir les informations modifié sur chaque pages dés ...
    (microsoft.public.scripting.vbscript)
  • resolution
    ... PersistsCsp property of the RSACryptoServiceProvider to true. ... Blankthe code attempts to obtain the persisted CspParameters from the ... The problem is that the first time I try to use the "rsa" object, ...
    (microsoft.public.dotnet.security)