HttpWebRequest Post with ClientCertificates working in Debug and VS, but not working in IIS

Discussion in 'ASP .Net' started by calebmeii@gmail.com, Jun 29, 2007.

  1. Guest

    Hi,

    Anyone's help is really appreciated!

    VS05 with .net 2.0, on Windows XP/2003 IIS 5/6, on ASP,

    When post a HttpWebRequest with client ceritificate

    X509Certificate cert =
    X509Certificate.CreateFromCertFile(certFile);

    Response.Write("Loaded cert: " + cert.GetName() + ": " +
    cert.GetIssuerName() + ", Hash:" + cert.GetCertHashString());

    HttpWebRequest objRequest =
    (HttpWebRequest)WebRequest.Create(url);

    objRequest.ClientCertificates.Add(cert);

    It works well in C# windows program, or ASP.net. In ASP.net, when it
    is in debug mode, it works.

    However, when I put the aspx into wwwroot, then the client certificate
    is not being sent along with the request. Given that I have printed
    out the cert info, and multiple attempts on permission, it seems like
    HTTPWebRequest is not sending the client certificate.

    Anyone has similar issue? Any tools that can assist me to troubleshoot
    the issue?

    Really appreciated!

    Cheers,
    Calebmei
    , Jun 29, 2007
    #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. Chandy

    Clientcertificates.IsPresent

    Chandy, Feb 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    763
    Chandy
    Feb 18, 2004
  2. =?Utf-8?B?RGF2ZSBCcm93bg==?=

    HttpWebRequest POST result is not the same as POST via ServerXMLHT

    =?Utf-8?B?RGF2ZSBCcm93bg==?=, Nov 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,132
    Joerg Jooss
    Nov 10, 2005
  3. Replies:
    1
    Views:
    698
  4. Robson Carvalho Machado

    CAPICOM and ClientCertificates

    Robson Carvalho Machado, Apr 26, 2006, in forum: ASP .Net Security
    Replies:
    1
    Views:
    174
    Robson Carvalho Machado
    Apr 27, 2006
  5. J. Muenchbourg
    Replies:
    0
    Views:
    349
    J. Muenchbourg
    Aug 6, 2003
Loading...

Share This Page