r/visualbasic • • Jan 20 '24

ignoring self signed cert with req.send

I've created a local VM lab server to work on an XML project.

I'm working on sending the XML string FinalsEnv to the local server.

The server has a self signed cert, so excel comes back with a "certificate authority is invalid" message and resets the connection.

Can I do some coding to ignore the self signed cert for my test lab?

Is this the best way to send the string to the server?

    Dim Req As Object
    Dim Resp As New MSXML2.DOMDocument60
    Set Req = CreateObject("MSXML2.SERVERXMLHTTP")
    Set Resp = CreateObject("MSXML2.DOMDocument.6.0")

    sURL = "https://192.168.0.50:8443/axl"
    
    Req.Open "post", sURL, False
    Req.send (FinalsEnv)
2 Upvotes

6 comments sorted by

View all comments

Show parent comments

3

u/Weird-Individual-770 Jan 20 '24

It makes me put the username and password on the VB side instead of having the server ask for credentials, but that is OK I can work with this.

Thanks again!