I need to connect to another server from IIS 7.5 using TLS 1.1. I'm trying to run the code I found on this SO question, but I cannot write to nor read from httpRequest.option(9)
-- the system says, invalid procedure call or argument: 'Option'. When I try Option(8) or other values, everything's OK. What am I doing wrong?
Here's the full code:
Const WinHttpRequestOption_SecureProtocols = 9
Const SecureProtocol_TLS1_1 = 512
Set WinHttpReq = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
WinHttpReq.Open "POST", url, false
WinHttpReq.Option(WinHttpRequestOption_SecureProtocols) = SecureProtocol_TLS1_1 'WinHttpReq.Option(9) = 512