question

MohamedGalal-8389 avatar image
0 Votes"
MohamedGalal-8389 asked MohamedGalal-8389 commented

How to resolve The request was aborted: Could not create SSL/TLS secure channel.

Am getting this error on my project in Visual Basic 2019

while traying to use API to send some data

 See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data) at System.Net.WebClient.UploadData(String address, String method, Byte[] data) at TaxAPI.TaxPortal.Button2_Click(Object sender, EventArgs e) in C:\Users\xxxx\Desktop\Testapi\Testapi\TaxPortal.vb:line 21 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- TaxAPI Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/xxxx/Desktop/Testapi/Testapi/bin/Debug/TaxAPI.exe ---------------------------------------- Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 14.8.4084.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll ----------------------------------------
dotnet-visual-basic
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It seems to me that you're trying to do something that requires a SSL/TSL protocol connection. Send the data to where? What code are you using to send the data? Do you know the requirements to send the data to wherever you're trying to send the data to?

https://www.csoonline.com/article/3246212/what-is-ssl-tls-and-how-this-encryption-protocol-works.html

0 Votes 0 ·

I solved it by changing NetFramwork version that support TLS 1.3.

0 Votes 0 ·

1 Answer

MohamedGalal-8389 avatar image
0 Votes"
MohamedGalal-8389 answered

I solve it by changing NetFramework version to NetFramework 4.8.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.