freshworks / fresh-samples

Samples of code created by freshdesk
184 stars 181 forks source link

SSL Exception #42

Closed luposky closed 3 years ago

luposky commented 7 years ago

I get this exception on Windows 10 (net framework 4.5.2):

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

Any ideas ?

luposky commented 7 years ago

this line solve the problem:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

not easy to find .. please update docs ...

omprakashsrv commented 7 years ago

similar is happening with android <= 4.4 and retrofit, okHttpClient Okhttp javax.net.ssl.sslexception: connection closed by peer

https://github.com/square/okhttp/issues/2372