本文介绍了期权WINHTTP错误9 /的Win2008 / ASP经典的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我连接到服务器需要TLS 1.1。我的尝试失败。我使用的是经典的ASP在Windows Server 2008 R2标准版SP1 64位机器上。

下面是我的code:

 常量WinHtt prequestOption_SecureProtocols = 9常量SecureProtocol_TLS1_1 = 512暗淡objHTTP设置objHTTP =的CreateObject(WinHttp.WinHtt prequest.5.1)

没有错误:

  objHTTP.Option(9)= 128

没有错误:

  objHTTP.Option(9)=&安培; H80

的错误就在这里:

  objHTTP.Option(WinHtt prequestOption_SecureProtocols)= SecureProtocol_TLS1_1

的错误就在这里:

  objHTTP.Option(9)= 512

的错误就在这里:

  objHTTP.Option(9)=&安培; H200

不要紧,凡在code我把这一行,我仍然得到这个错误,因为它试图执行:

Microsoft VBScript运行时错误800a0005

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?

解决方案

If you open the winhttp.dll in visual studio object browser, the version in Windows Server 2008 does not contain the constants for TLS1.1 and TLS1.2 under WinHttpRequestSecureProtocols enum.

If you do the same for Windows Server 2012, you'll find that the constants for TLS1.1 and TLS1.2 do appear.

I don't see an update available for Win 2008 to upgrade winhttp. If one exists I'd like to know. I haven't tried copying the Win 2012 version to Win 2008. I don't know if that would cause issues or not.

这篇关于期权WINHTTP错误9 /的Win2008 / ASP经典的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 01:06