Request.ClientCertificate collection type mismatch

Discussion in 'ASP General' started by Michel Gallant, Oct 17, 2005.

  1. 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
     
    Michel Gallant, Oct 17, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Øyvind Isaksen
    Replies:
    1
    Views:
    980
    Øyvind Isaksen
    May 18, 2007
  2. LlibreDev
    Replies:
    1
    Views:
    276
    Alun Jones [MS MVP]
    Feb 15, 2004
  3. Freddy Rios

    Request.ClientCertificate - asp.net 2.0 web service

    Freddy Rios, Mar 5, 2008, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    427
    Freddy Rios
    Mar 5, 2008
  4. Meelis Lilbok

    Request.ClientCertificate

    Meelis Lilbok, Sep 14, 2004, in forum: ASP General
    Replies:
    1
    Views:
    163
    Meelis Lilbok
    Sep 14, 2004
  5. carles

    Request.ClientCertificate

    carles, Mar 2, 2006, in forum: ASP General
    Replies:
    0
    Views:
    186
    carles
    Mar 2, 2006
Loading...

Share This Page