Msxml2.ServerXMLHTTP.6.0 not working for TLS 1.2

Please help,
I am currently using the below code
SET objXmlHttp = CreateObject ("Msxml2.ServerXMLHTTP.6.0")
I am getting the "Security error"
I also tried, WinHttp.WinHttpRequest.5.1, no change getting the same error.
sajee selvaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

btanExec ConsultantCommented:
Similar situation here.
You need to have your server (e.g.  2012 R2 ) to support TLS1.2  first. WinHTTP.WinHTTPRequest.5.1 worked fine on 2012 and Msxml2.ServerXMLHTTP.6.0 does not. But, for example, if using unsupported OS like Windows 2008 R2 does not support TLS1.2 for either of these methods WinHTTP.WinHTTPRequest.5.1 or Msxml2.ServerXMLHTTP.6.0
sajee selvaAuthor Commented:

Please help

We are using 2008 SP2 and TLS 1.1 and 1.2  are enabled.
Please suggest which method to use.
btanExec ConsultantCommented:
Can enable the option and ensure registry is created
This update adds support for DefaultSecureProtocols registry entry that allows the system administrator to specify which SSL protocols should be used when the WINHTTP_OPTION_SECURE_PROTOCOLS flag is used.

To apply this update, the DefaultSecureProtocols registry subkey must be added.

You may have to restart the computer after you apply this update.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
btanExec ConsultantCommented:
For consideration.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.