Error msg when doing client-side authentication

Discussion in 'ASP .Net Security' started by David Martin, Oct 9, 2005.

  1. David Martin

    David Martin Guest

    Hi,
    I am trying to make a request from a web service to an external
    site which uses https. I have a certificate (.p12 format) from them. I
    have performed the following steps:

    1. Exported the certificate to DER encoded .CER file.
    2. Imported the certificate into the Trusted Root CA of the local
    computer
    3. Used X509Certificate.CreateFromCertFile() to create a
    X509Certificate object from the .CER file.
    4. Added this certificate to the HttpWebRequest using
    httpRequest.ClientCertificates.Add(cert);
    5. When I try to retrieve the response using
    httpRequest.GetResponse(), I get the following error:
    "The remote server returned an error: (403) Forbidden."

    Any idea what this means and how to get past it? I have a feeling that
    the certificate is not being sent to the external site.
    Any help will be highly appreciated.

    (This post was posted a long time ago.. but never got an answer)
     
    David Martin, Oct 9, 2005
    #1
    1. Advertisements

  2. David Martin

    Mfenetre Guest

    Mfenetre, Oct 10, 2005
    #2
    1. Advertisements

  3. David Martin

    Mfenetre Guest

    Well in fact, not exactly...

    I've tried to load the certificate from a file but it has never worked.
    However, I've found some posts saying that if you load the certificate
    from the current user personal store, it should work (look how I did it
    in my post) but it didn't work for me...

    regards,

    Alexis.
     
    Mfenetre, Oct 10, 2005
    #3
    1. Advertisements

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. ^CrazyCoder^
    Replies:
    3
    Views:
    7,637
    Terrence Benade
    Sep 15, 2003
  2. yaya coco
    Replies:
    1
    Views:
    529
    Rajesh Tiwari
    Jul 4, 2003
  3. Boss302
    Replies:
    0
    Views:
    1,325
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    846
    Bogdan
    Jun 9, 2008
  5. akila_natarajan

    Read .msg attachment from a mail(.msg)

    akila_natarajan, May 13, 2011, in forum: Java
    Replies:
    0
    Views:
    594
    akila_natarajan
    May 13, 2011
  6. Zoe Hart
    Replies:
    1
    Views:
    584
    Scott Wisniewski
    Jan 8, 2004
  7. Charles Lowe
    Replies:
    0
    Views:
    413
    Charles Lowe
    May 13, 2007
  8. Charles Lowe
    Replies:
    0
    Views:
    364
    Charles Lowe
    Aug 22, 2007
Loading...