期权WINHTTP错误9 /的Win2008 / ASP经典 [英] WinHttp errors on option 9 / Win2008 / Classic ASP

查看:479
本文介绍了期权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


  

无效的过程调用或参数:'选项'


我的服务器的浏览器IE8是,所以我安装IE11希望更好的结果。同样的错误。

我必须设置为IE11的互联网选项


  • (不选)使用SSL 2.0

  • (不选)使用SSL 3.0

  • (不选)使用1.0

  • (选中)使用TLS 1.1

  • (选中)使用TLS 1.2

在注册地:

<$p$p><$c$c>HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\

我有TLS 1.1和1.2定在启用= 1 DisabledByDefault = 0

所有其余的对面。

我也做了同样的 / ControlSet001 / /与ControlSet002 /

我为什么不能设置 objHTTP.Option(9)= 512 ?结果
奖金的问题:为什么在WinHTTP的TLS 1.0坚持不管我的服务器的设置


解决方案

如果您打开 winhttp.dll 在Visual Studio中的对象浏览器,在Windows Server 2008版本不不包含下TLS1.1和TLS1.2常数 WinHtt prequestSecureProtocols 枚举。

如果您对Windows Server 2012中做同样的,你会发现,对于TLS1.1和TLS1.2的常量真的出现。

我没有看到可供2008年赢来升级WinHTTP的更新。如果存在的话,我想知道的。我还没有尝试复制赢2012版赢得2008年。我不知道这是否会导致问题或没有。

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?

解决方案

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经典的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆