|
-
Oct 21st, 2003, 10:20 AM
#1
Thread Starter
New Member
ClientCertificates.Add - HttpWebRequest
I am trying to load a certificate into a X509Certificate object in order that I can then attach it to a HTTPS POST. I am getting a 403 forbidden error from the server that I am trying to connect to - indicating that the certificate is perhaps not being attached corrctly. I am using VB.NET within and ASP.NET page. Can anyone please help?
Dim myRequest As HttpWebRequest
Dim myResponse As HttpWebResponse
myRequest = CType(WebRequest.Create(theQuoteURL),HttpWebRequest)
myRequest.Method = "POST"
myRequest.ContentType = "text/xml"
Dim cert As X509Certificate = X509Certificate.CreateFromCertFile("C:\Inetpub\wwwroot\config\OSIS\HLAM.cer")
myRequest.ClientCertificates.Add(cert)
#####After this point the remote server does not seem to recognise the certificate that we have tried to attach.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|