Persits Software, Inc. Knowledge Base Articles

Object required: 'Context' error

Problem Description

When running the code sample GetRequest.asp and submitting a certificate request file, the following error is generated by the script file GenCertFromRequest.asp :

Microsoft VBScript runtime (0x800A01A8)
Object required: 'Context'


The code sample GenCertFromRequest.asp uses a "bogus" (non-existant) serial number for the signer certificate:

Set Store = CM.OpenStore("ROOT", True )
Set Cert = Store.Certificates("03804327900076BF11D359B02A22331C")

You must replace the bogus number passed to Store.Certificates by the actual serial number of a certificate you will be using as your signer certificate.

To see all certificates (and their serial numbers) in your machine's cert stores, run the code sample Samples\cert_stores\certs.asp.