Hello.
I'm trying to write a script o post the content of a text file to a ASP web page. I need to provide username and password to log on to that web page. This ASP web page also needs a digital certificate to authenticate.
I'm using the code bellow but i get the message "a connection to the server cannot be established".
Can anyone give me a hint on this or point me into another direction?
Dim HttpReq As New WinHttpRequest
Dim strFileName As String
Dim strFileText As String
Dim intFileNo As Integer
strFileName = "XML_FILE.XML"
intFileNo = FreeFile()
Open strFileName For Input As #intFileNo
strFileText = Input(LOF(intFileNo), intFileNo)
Close #intFileNo
sUrl = "https://extranet.test.pt/test.asp"
UserName = "user"
Password = "pwd"
HttpReq.SetClientCertificate ("Luis Miguel Ribeiro")
HttpReq.Open "POST", sUrl, False
HttpReq.SetCredentials UserName, Password, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
HttpReq.Send strFileText
Status = HttpReq.Status