I have built a VB DLL which calls CryptAcquireContext() API. if i instantiate this dll from a VB project it works fine but the same DLL if called from an ASP page, the CryptAcquireContext() API fails.
If change the login in IIS from anonymas to Windows NT then it works fine. But i need to login as an anonymas user.
The code looks like
Private Const STORAGE_NAME = "Key Storage"
Private Const SERVICE_PROVIDER As String = "Microsoft Enhanced Cryptographic Provider v1.0"
Private Const SECURITY_PROVIDER_TYPE As Long = 1
Private Const CRYPT_MACHINE_KEYSET As Long = 32
Private Const AT_KEYEXCHANGE = 1
CryptAcquireContext(hStorage, STORAGE_NAME, SERVICE_PROVIDER, SECURITY_PROVIDER_TYPE, CRYPT_MACHINE_KEYSET)
Any help will be greatful