Exception : The requested security protocol is not supported c#.
My application is using .net framework 3.5 and run on server windows 2016. After i started getting exception "The underlying connection was closed: An unexpected error occurred on a send." I changed my code and defined the protocol security as below-
Const _Tls12 As SslProtocols = DirectCast(&HC00, SslProtocols)
Const Tls12 As SecurityProtocolType = DirectCast(_Tls12, SecurityProtocolType)
ServicePointManager.SecurityProtocol = Tls12
After changing my code at my local environment started working but still have issue at Live server.
"The requested security protocol is not supported."
I have already defined the possible security protocol but still the same code is not working for Live.
Also, due to limitations of the version we are using, we cannot upgrade the Framework at this time.
Please suggest.