The Server I am connecting to requires TLS 1.1. My attempts fail. I am on a Windows Server 2008 R2 Standard SP1 64bit machine using Classic ASP.
Here is my code:
const WinHttpRequestOption_SecureProtocols = 9
const SecureProtocol_TLS1_1 = 512
dim objHTTP
set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
No error:
objHTTP.Option(9) = 128
'No error:
objHTTP.Option(9) = &H80
'Errors right here:
objHTTP.Option(WinHttpRequestOption_SecureProtocols) = SecureProtocol_TLS1_1
'Errors right here:
objHTTP.Option(9) = 512
'Errors right here:
objHTTP.Option(9) = &H200
It does not matter where in the code I place this line, I still get this error as it tries to execute:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Option'
My Server's Browser was IE8, so I installed IE11 hoping for better results. Same error.
I have the Internet options of IE11 set to
- (Unchecked) Use SSL 2.0
- (Unchecked) Use SSL 3.0
- (Unchecked) Use TLS 1.0
- (Checked) Use TLS 1.1
- (Checked) Use TLS 1.2
In the Registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\
I have TLS 1.1 and 1.2 set at enabled=1
and DisabledByDefault=0
All the rest are set opposite.
I did the same at /ControlSet001/
and /ControlSet002/
Why can't I set objHTTP.Option(9) = 512
?
Bonus question: Why is WinHttp insisting on TLS 1.0 regardless of my Server's settings?