CryptAcquireContext failed for non-interactive user



Hi all,
i have a problem when using CryptAcquireContext in application which
is started from service.
CryptAcquireContext failed with 0x80090020 - An internal error
occurred
The same application works fine when it is started from command
prompt.
As i see it can work and from service but for that i should change my
service to run under "Interactive user" or to make LogonUser in this
application with LOGON32_LOGON_INTERACTIVE

Is there any idea what to do and where can be the problem, because i
don't like the above workarounds.
CryptAcquireContext work fine and when my service is started with
Local Service account but in this case i have problem to reach private
keys on smart card.

OS is Windows server 2003, under XP all is OK.

Thanks in advance

.



Relevant Pages

  • RE: CryptAcquireContext failed for non-interactive user
    ... the current user's crypto store. ... Or you can just create a temp context with ... CryptAcquireContext failed with 0x80090020 - An internal error ... CryptAcquireContext work fine and when my service is started with ...
    (microsoft.public.platformsdk.security)
  • Re: When shouldnt I use default key container in CryptAcquireContext?
    ... It is not recommended that you use the NULL container. ... > generate key pair in application, but use standard certificates and keys. ... > I use CryptAcquireContext and on some computers receive BAD_KEYSET error. ... > HCRYPTPROV hCryptProv; ...
    (microsoft.public.platformsdk.security)