I have an application coded in VB.net that has this method of accessing Webservice, i have this error and after searching fixes i still have no luck.
Error: The requ
I'm going to add something here in case it helps others. I have to support some legacy code that is written in VB.Net and targets .NET Framework 4.6.1. The same piece of code runs in both an .exe, and in IIS as a web page.
In the website, this call:
Dim dataStream As Stream = request.GetRequestStream()
would throw this exception
The request was aborted: Could not create SSL/TLS secure channel.
but it worked fine in the .exe.
Forcing the TLS protocol fixed it in the website.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
Of course if the host ever deems TLS 1.2 unworthy I'll have to fix/recompile/redeploy, but it solved the error for now.