403 error...

A

Arun

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.

Thanks,
Arun
 
J

Joe Kaplan \(MVP - ADSI\)

Does the certificate in the store say it has a private key associated with
it? CAPI needs to have the private key available for SSL client
authentication, so you need to make sure the private key is imported into
the store when you import the certificate.

Joe K.
 
C

Chun

Hi Arun,

I having same error as you and i did all the steps you did. Can you
tell me how to fix it?

Thanks,

Chun
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top