|
-
Oct 3rd, 2019, 06:56 PM
#1
Thread Starter
Member
MSXML2.ServerXMLHTTP60 with TLS 1.2 support XP POSReady
I've got an XP POSReady system with all the correct registry keys, applied updates, and the IE TLS 1.2 checkbox set. I've got a simple test application that's returning my connection as TLS 1.2 in the IDE. When I compile the application to an executable, however, the program returns TLS 1.0 as my connection result when using ServerXMLHTTP60.
I'm having a tough time tracking down why. I've run registry and file monitors to make sure the IDE and the executable are referencing the same dlls and keys, and can't find a reason for this. I've tried with references and without (late binding) and both return the same results.
Incidentally, I tested Msxml2.XMLHTTP60, which works correctly in both the IDE and application. It's only MSXML.ServerXMLHTTP60 that doesn't work in the executable.
Code:
Private Sub Command1_Click()
' Create a reference to MSXML6 if you want to use the next line,
' and rem out the two lines that follow this
' Dim objhttp As New MSXML2.ServerXMLHTTP60
Dim objhttp As Object
Set objhttp = CreateObject("Msxml2.ServerXMLHTTP.6.0")
objhttp.open "GET", "https://howsmyssl.com/a/check", False
objhttp.setRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0"
objhttp.setRequestHeader "Content-type", "text/html"
objhttp.send
Debug.Print objhttp.getAllResponseHeaders
Debug.Print objhttp.responseText
Text1.Text = Text1.Text & vbCrLf & objhttp.getAllResponseHeaders & vbCrLf & objhttp.responseText
Set objhttp = Nothing
End Sub
I did check my path to make sure only MSXML6.dll, MSXML6r.dll, and WinHttp.dll in System32 are being utilized, and not some copies in some other directories in the path, so I'm not sure why this is happening.
Also, I prefer to use the XML library and not Winhttp.dll directly, as I'm dealing with XML data from the server that my actual program is connecting, and the application is already fully written. The service provider is just enforcing TLS 1.2 very shortly.
Here's the VB6 project if you want to download and test for yourself.
tls.zip
Last edited by Montclair; Oct 4th, 2019 at 07:08 AM.
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
|