【发布时间】:2017-10-16 11:56:23
【问题描述】:
我正在计算机科学课上编写程序,但在尝试获取计算机的公共 IPv4 地址时遇到错误。
这是我的代码:
Private Function GetMyIP() As Net.IPAddress
Using wc As New Net.WebClient
Return Net.IPAddress.Parse(Encoding.ASCII.GetString(wc.DownloadData("http://tools.feron.it/php/ip.php")))
End Using
End Function
然后使用以下代码调用它:
tboxPublicIPv4.Text = GetMyIP().ToString
但是,当它尝试将 IPv4 地址写入文本框时,我收到此错误:
An unhandled exception of type 'System.Net.WebException' occurred in System.dll
Additional information: The request was aborted: Could not create SSL/TLS secure channel.
任何帮助将不胜感激。谢谢。
【问题讨论】:
标签: vb.net ssl system.net.webexception