WinHTTP-与服务器的连接异常终止 [英] WinHTTP - The connection with the server was terminated abnormally

查看:265
本文介绍了WinHTTP-与服务器的连接异常终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导入WinHTTP并尝试在https网址中执行请求,如下所示:

 函数TForm1.GetPage(AURL:String):字符串;变种WinHttpRequest:IWinHTTPRequest;开始CoInitialize(nil);尝试WinHttpRequest:= CoWinHttpRequest.Create;WinHttpRequest.Open('GET',AURL,False);WinHttpRequest.Send(EmptyParam);结果:= WinHttpRequest.ResponseText;最后WinHTTPRequest:=零;CoUninitialize;结尾;结尾; 

它可以在相同的页面中运行(例如: https://www.google.com ),但不适用于同一页面在其他情况下(例如: https://sourceforge.net ),出现错误与服务器的连接异常终止".

我还有其他设置要忘记吗?

我正在使用Delphi 2010.

解决方案

大多数服务器已经从接受SSL传入流量转向使用TLS协议.Windows 7和8没有定义TLS协议,因此VBA使用SSL发送流量,然后此类服务器将其阻止/丢弃.

您将需要进行两步修补/更新才能修复Windows 7上的问题,

步骤1.获取Microsoft更新:下载相关的(32位或64位用户的Windows版本) Microsoft安全协议更新,如果尚未安装,请进行安装./p>

步骤2.下载Microsoft Easy Fix:从以下位置下载Microsoft轻松修复"https://www.google.com), but not in others (ex: https://sourceforge.net), with error "The connection with the server was terminated abnormally".

Are there any additional settings I'm forgetting?

I'm using Delphi 2010.

解决方案

Most servers have migrated away from accepting SSL incoming traffic in favor of TLS protocol. Windows 7 and 8 do not have TLS protocol defined and hence VBA sendss traffic with SSL which is then blocked/dropped by such servers.

You will need to apply a 2-step patch/update to fix this for windows 7,

Step 1. Get Microsoft Update: Download relevant (32-bits or 64-bits of user's Windows version) Microsoft Security Protocol Update and install if not already install.

Step 2. Download Microsoft Easy Fix: Download Microsoft "Easy Fix" from Microsoft Support Article, and execute to set TLS 1.1+ as default.

Source : Update to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP in Windows

这篇关于WinHTTP-与服务器的连接异常终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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