Request.ClientCertificate collection type mismatch

M

Michel Gallant

I have used simple asp pages to enumerate value/properties of the
Request.ClientCertificate collection like so:

For Each strKey in Request.ClientCertificate
Response.Write strkey & " = " & Request.ClientCertificate(strkey) & "<BR>"
Next

exactly as suggested in the MSDN documentation here (under the Sample Code
for VBS):
http://msdn.microsoft.com/library/d...html/2c81853d-3199-4013-9e3b-c921d64e549f.asp

That worked in W2k Pro sp2 ... last year, but I recently upgraded to XP Pro sp2
and now, that simple asp enumeration throws a VBS mismatch error:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/cryptoasp/clientcert00.asp, line 10

I need to explicitly convert to a string to avoid the error using:
CStr(Request.ClientCertificate(strkey))

When did this change occur??

Note that this explicit casting to a string using CStr is not required for collections
such as Request.ServerVariables

Thanks,
- Mitch Gallant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top