从我读到的几个主题来看,绝大多数与贝宝有关,其他一些与称为 ServicePointManager 的东西有关。这与其他问题无关!在这种情况下,我只是尝试一个基本的 html 敏捷包示例,与 paypal 或 ServicePointManger 无关:
var url = "some_url";
var web = new HtmlWeb();
var doc = web.Load(url);
标记的行会引发此错误:
Unhandled Exception: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
at HtmlAgilityPack.HtmlWeb.Get(Uri uri, String method, String path, HtmlDocument doc, IWebProxy proxy, ICredentials creds) in C:\something\HtmlAgilityPack\HtmlAgilityPack.Shared\HtmlWeb.cs:line 1677
at HtmlAgilityPack.HtmlWeb.LoadUrl(Uri uri, String method, WebProxy proxy, NetworkCredential creds) in C:\Users\Jonathan\source\repos\HtmlAgilityPack\HtmlAgilityPack.Shared\HtmlWeb.cs:line 2086
at HtmlAgilityPack.HtmlWeb.Load(Uri uri, String method) in C:\something\HtmlAgilityPack\HtmlAgilityPack.Shared\HtmlWeb.cs:line 1300
at HtmlAgilityPack.HtmlWeb.Load(String url) in C:\something\HtmlAgilityPack\HtmlAgilityPack.Shared\HtmlWeb.cs:line 1197
at DownloadSeco.Program.Main(String[] args) in C:\something\Program.cs:line 16
究竟是什么导致了这个错误,如何解决它?
编辑:我正在关闭该主题,显然问题出在我的特定计算机上,因为它可以在我旁边的 PC 上运行。
一只萌萌小番薯
月关宝盒
相关分类