Hi,
I have a web service which requires client end certificate authentication. I've installed the cert (pfx format) successfully. I then used IE to launch the URL and it prompted me for certificate, which once selected it can go through and the expected XML response will be shown in the browser.
However, when I use below code to submit the web service call, the response from the server shows: API client certificate not provided or not valid, which should not be the case, since it works through the browser.
Appreciate your help!
Thanks
<%@ Language="VBScript" Debug="true" %>
<%
Dim fso, Output, oHttp, strResult, strSoapReq
fso = CreateObject("Scripting.Filesystemobject")
strSoapReq = fso.OpenTextFile("D:\registration.txt").ReadAll
oHttp = CreateObject("Msxml2.ServerXMLHTTP.6.0")
oHttp.open ("POST", "<url>")
ohttp.setRequestHeader ("Content-Type", "application/json")
ohttp.setOption (3, "<certificate>")
oHttp.send (strSoapReq)
strResult = oHttp.responseText
Output = fso.OpenTextFile("D:\Output.txt", 8, 1)
Output.writeline (strResult)
Output.close
%>